Hi,
I would like to write a python tool that does something with all material expressions inside of a given material.
I have some issues with two material expressions:
- Named Reroutes
- Material Functions
Named Reroutes are particular annoying, because the team is using them a lot.
My script currently runs recursively over all expressions, starting from the material inputs, but I cannot find a way to access the Named Reroute Declaration- from a given Named Reroute Usage Expression, so I cannot proceed if I stumble upon a Reroute Usage Exression.
I also seem to have no option to get just every single expression that is available in a material graph even if not connected to the material.
What are my options to support Named Reroute Expressions in my tool?
Sample code: Recursively go thru material expressions
Sample material graph: Material with reroute expressions
Thanks,
Micha