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
    • Register
    • Login

    Unable to Retrieve the Input Port of Value Node

    Cinema 4D SDK
    2023 python
    2
    3
    349
    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 bentraje

      Hi,

      I've been able to retrive the value of redshift input ports using the following. Works as expected.

      port_str = "com.redshift3d.redshift4c4d.nodes.core.standardmaterial.refl_weight"
      input_port = standard_node.GetInputs().FindChild(port_str)
      

      However, retrieving the port of built-in nodes gives me null

      port_str = "net.maxon.description.data.base.defaultvalue"
      input_port = value_node.GetInputs().FindChild(port_str) # This gives me null
      

      The port_str is what is also reflected in the resource editor.

      Are there specific method for retrieving the input of the value node?

      d57d06ff-27c1-4564-bfec-2c1dbc001003-image.png

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

        Hi,

        this ID of this port is just "in"

        6acf87aa-b23d-48e8-967a-a333d4bd6b6f-image.png

               port =  node.GetInputs().FindChild("in")
        

        You can display the IDs in the preferences -> Node Editor.
        You can also copy the node and paste it to a text editor.

        "net.maxon.description.data.base.defaultvalue" is the ID for the default value of the port.

        Cheers,
        Manuel

        MAXON SDK Specialist

        MAXON Registered Developer

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

          @manuel said in Unable to Retrieve the Input Port of Value Node:

          port = node.GetInputs().FindChild("in")

          Ah I gotcha. I always forget about displaying IDs in hte preferences since I'm hopping between old and newest versions of C4D. My bad.

          Anyhow, works as expected.

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