Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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

    XPresso python node

    Cinema 4D SDK
    2
    3
    606
    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.
    • Passion3DP
      Passion3D
      last edited by Passion3D

      In a python node, is it possible to know how many inputs and outputs there are? and their name?

      1 Reply Last reply Reply Quote 0
      • P
        PluginStudent
        last edited by

        The op variable gives acess to the node itself. From there it is straightforward:

        for port in op.GetInPorts():
          print(port.GetName(op))
        
        for port in op.GetOutPorts():
          print(port.GetName(op))
        

        See Python Xpresso Node and c4d.modules.graphview.GvNode.

        1 Reply Last reply Reply Quote 1
        • Passion3DP
          Passion3D
          last edited by

          Thanks @PluginStudent 😉

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