MItDependencyGraph and render layer adjustments

14 views
Skip to first unread message

Henry Foster

unread,
Aug 14, 2018, 8:37:28 PM8/14/18
to Python Programming for Autodesk Maya
I've run into a particularly weird problem I'm not sure how to solve.

I need to traverse shading networks in order to get all upstream nodes. I'm trying to use the Python API to do this, via the MItDependencyGraph iterator. This is great and fast, except in the weird case where a connection exists on some render layers, but NOT on the defaultRenderLayer. Even if I switch to that layer and I can see all the connections in the Hypershade, if the connection doesn't exist on the defaultRenderLayer, the iterator doesn't seem to be able to see it at all. The team I'm supporting loves to use render layer overrides to have things connected on some layers but not others, and it's not a behavior I'm in any position to change. Is there a way to convince the iterator to traverse these connections?
Reply all
Reply to author
Forward
0 new messages