So, I have a script I’m working on. It is a mel script so although python may be easier, I can’t use it in this case.
The script I’m working on changes attributes on a redshift shader.
Redshift shaders do bump maps differently than vray or mental ray. Basically you have to create a bump node (or normal node), connect that to the bump slot, and then do all the adjustments to the bump within that node.
So here is my question. How do I get the script to find the node I created last? For instance, if I’ve created 5 bump nodes already the sixth bump node will be called “rsBumpMap6” or whatever number map it is. But every scene is different.
So how do I write a script that says “create a new bump node, and then connect it over here” when I won’t know what that newly created node will be called? I feel like there must be a simple solution to this but I can’t think of one.
Thanks!