I'm trying to write a script that modify the selected nodes only if the node is an RS Texture node. And the way I can know if its an RS Texture Node is if it has the
tex0 attribute (see below)
My logic is something like this:
rs_texture_node = node.GetInputs().FindChild("com.redshift3d.redshift4c4d.nodes.core.texturesampler.tex0") if rs_texture_node.IsValid(): # Do something here
It works if the node selected is a texture node but throws a
ValueError: no target to copy for '<net.maxon.graph.interface.graphmodel>' if its otherwise.
Which I don't get. It's either the node/port is valid or not. Why throw an error?