I’m still having troubles. I am pretty much a newb to this.
Here is an example script I am using to try get it to work. The idea is to have a script inside the D3D material, then run it selecting the appropriate node connectors, connecting and disconnecting when I tell it to - creating a shader switch within the shader node - that could be applied to many objects dynamically.
Code: Select all
first = Space.Select("SolidColorShader")
second = Space.Select("Material")
OR
Code: Select all
first = Node.Select("SolidColorShader")
second = Node.Select("Material")
In order to:
Code: Select all
Node.ConnectTo(first, 'Color_shader', second, 'Color_shader');
But it’s not working..
How do I dynamically work nested nodes? The name of the object will change, but the controls for the shader switches will remain. I want to toggle materials on an object with such material, any object, with such applied material including the switch.
Example (script placed in object):
Code: Select all
[item] = Space.CurrentScene() + "[Node.Self]/Materials/Material/D3D material/[nested node]"
- then the rest of the script
Or better yet (script placed within parent node - “D3D material”)
Code: Select all
[item] = [Node.Self] + "[nested node]"
I am very new to this, sorry for all the questions and the bothers.. but I appreciate the help.