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

    Sample Code for Connecting Ports/Nodes?

    Cinema 4D SDK
    r25 python
    2
    4
    458
    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,

      Is there a sample code for connecting ports/nodes?
      Checked the sample code in github. Correct me if I'm wrong but no examples for it.

      c478f191-0991-4d0c-bfb8-c8c97b9ba011-image.png

      1 Reply Last reply Reply Quote 0
      • ManuelM
        Manuel
        last edited by

        Hi,

        There is no example that show specifically how to connect two ports because there is a function to do it. The function Connect must be used to connect two ports.

        You can still have a look at this example where we mute a connection. To do so, we retrieve the wire, we change its attribut and reconnect the ports using this modified wire.

        We will add another example where this function is used.

        Cheers,
        Manuel

        MAXON SDK Specialist

        MAXON Registered Developer

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

          @Manuel

          Gotcha. Thanks for the response.
          Still having a hard time accessing the ports. Anyway for this quetion, I guess the Connect method does the job.

          Also, why would a mute_selected_wire have more preference for connect_wires_between_nodes in terms of example?
          It's like majority of the time spent in the node graph is creating, deleting and connecteding nodes.

          1 Reply Last reply Reply Quote 0
          • ManuelM
            Manuel
            last edited by

            hi,

            There are no particular reasons. Muting a connection is less intuitive than connect two nodes. If there was a function like Connect to mute the connexion, we would not have created that example neither.

            Cheers,
            Manuel

            MAXON SDK Specialist

            MAXON Registered Developer

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