SOLVED Unable to Retrieve the Input Port of Value Node

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

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

@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.