Hello!
I have 3 Arnold Shaders called : red, green, blue.
I'm testing operators and trying to find any object with "blue" shader applied and replace with a "green" shader. But not seems works, maybe I don't write correctly expression:
*.(shader == "blue")
I attach a screenshot.
What I'm doing wrong here?
Maybe with something like that in selection:
/*.(@node == 'polymesh' and shader == 'blue|standard_surface')
But no luck.
Thanks!
Solved! Go to Solution.
Solved by peter.horvath6V6K3. Go to Solution.
You have to test a parameter value.
*.(@node == 'polymesh' and shader.name == 'Red')
polymesh.shader is a link to a shader node
and
a shader node has a name parameter
Exactly what Stephen said. Also note that the name of an Arnold shader exported from C4D has the following format:
/[material_name]|[shader_name]
Spaces and other special characters are replaced with '_'.
So assuming you have an Arnold Material named 'blue' with a standard_surface shader as the root using the default name 'standard_surface' you have to write:
*.(@node == 'polymesh' and shader.name == '/blue|standard_surface')