Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Add Object Output Parameter of a Node

    Cinema 4D SDK
    r20 python
    2
    6
    961
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      bentraje
      last edited by

      Hi,

      Adding output parameters in an expresso node that are present in the attribute manager such as Position or Fillet are straightforward since you can just drag it to the console. The resulting code is like:

      AddPort(c4d.GV_PORT_OUTPUT, c4d.ID_BASEOBJECT_POSITION)
      AddPort(c4d.GV_PORT_OUTPUT, c4d.PRIM_CUBE_DOFILLET)
      

      My problem is on the upper hierarchy parameter of an xpresso node such as Object, Global Matrix, Local Matrix since you can't drag them into the console.

      You can see an illustration of the problem here:
      https://www.dropbox.com/s/knhum4svjtllw9v/c4d113_expose_node_parameters_python.png?dl=0

      I tried retrieving the ID using this code:
      https://github.com/aturtur/cinema4d-scripts/blob/master/AR_XpressoNodeInfo.py

      It returns an ID for the Object Parameter as 40000002
      but when I tried running this script:
      AddPort(c4d.GV_PORT_OUTPUT, 40000002)

      It does nothing

      Is there a way around this?

      Thank you for looking at my problem

      1 Reply Last reply Reply Quote 0
      • B
        bentraje
        last edited by

        I also tried the
        AddPort(c4d.GV_PORT_OUTPUT, c4d.GV_OBJECT_OPERATOR_OBJECT_OUT)

        The ID was from the gvobject.res file but for some reason, it has no effect (i.e. no port added).
        It also does not error out.

        1 Reply Last reply Reply Quote 0
        • B
          bentraje
          last edited by

          Hi,

          I checked on this 2014 thread "https://developers.maxon.net/forum/topic/7744/9824_object-node-object-port" and it says

          "The object port is broken in python."

          Is this still applicable in 2019?

          1 Reply Last reply Reply Quote 0
          • M
            m_adam
            last edited by

            Yes, unfortunately, this is still applicable in 2019 (aka up to R20SP2) but it will be fixed in the next build available.

            Cheers,
            Maxime.

            MAXON SDK Specialist

            Development Blog, MAXON Registered Developer

            1 Reply Last reply Reply Quote 1
            • B
              bentraje
              last edited by

              Thanks for the confirmation! Looking forward to the next release.
              Will close this thread for now and just update it when the release comes.

              1 Reply Last reply Reply Quote 0
              • M
                m_adam
                last edited by m_adam

                This issue is now fixed in R21.

                Cheers,
                Maxime.

                MAXON SDK Specialist

                Development Blog, MAXON Registered Developer

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post