I am working on a script to keep track of the material overrides for layers. The script works fine, but when I have a scene that has duplicated hierarchies, things become problematic.
Here's a quick setup:
- Take a scene and add a cube. Then make the cube a child of another object (I used a locator for the example).
- Duplicate the locator
locator1 ->pCube1 locator2 >pCube1
While performing an ls in the scripting editor, I get "locator1|pCube1"and "locator2|pCube1". That's fine and there's no problem. The problem begins with editRenderLayerAdjustment.
If I try to query with editRenderLayerAdjustment, and plug the results in PyMel, I get an error because editRenderLayerAdjustment does not prepend the name of the parent onto the adjustment, and Maya cannot decide which attribute belongs to which object because it is only providing the name of the object + the attribute (for example, pCube1.attributeName).
Has anyone run into issues like this before? If so, what are solutions that you have come up with? Thanks!