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

    Object node object port

    PYTHON Development
    0
    3
    407
    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.
    • H
      Helper
      last edited by

      On 04/03/2014 at 08:47, xxxxxxxx wrote:

      Hi,

      I have read allot about adding ports to expresso nodes i got it working on my python node.
      But my object nodes don't get te added object port. I found some other people having problems with this but didn't find a solution there only stuff for userdata i'm not using any userdata. I'm stuck here : c4d.GV_OBJECT_OPERATOR_OBJECT_IN

      targetObjectNode = nodes.CreateNode(nodes.GetRoot(), c4d.ID_OPERATOR_OBJECT , None, 5, 50)
      targetObjectNode[c4d.GV_OBJECT_OBJECT_ID] = targetData
      targetObjectNodeOutput = targetObjectNode.AddPort(c4d.GV_PORT_OUTPUT,c4d.GV_OBJECT_OPERATOR_OBJECT_IN) #Object output port
      

      If somebody can explain me what i'm doing wrong much appreciated

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        On 04/03/2014 at 10:07, xxxxxxxx wrote:

        The object port is broken in python. To bypass this create an object link in the objects user data add the object to that data and create a port for the link.

        This is really annoying and wish it would get fixed. Bypassing creates a lot of unnecessary extra code.

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          On 05/03/2014 at 07:00, xxxxxxxx wrote:

          Thanks, work around is working.

          im trying to change the names of these ports

          pythonNodeInput1 = pythonNode.AddPort(c4d.GV_PORT_INPUT,c4d.IN_LINK)  
          pythonNodeInput2 = pythonNode.AddPort(c4d.GV_PORT_INPUT,c4d.IN_LINK)
          pythonNodeInput1.SetName("test")
          pythonNodeInput2.SetName("test2")
          

          both ports are named link now. Is it possible to rename a port?
          In documentation i found SetName() but that changes the name of node not the port.

          what im i doing wrong hehe

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