-
Notifications
You must be signed in to change notification settings - Fork 215
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When you reference the same external maya scene file multiple times and that scene contains a mayaUsdProxyShape, Maya will crash on file open.
This behavior does not happen when there is only a single reference, or two references to two different maya files.
Steps to reproduce
Steps to reproduce the behavior:
- Create a mayaUsdProxyShape pointing to a USD layer in a scene, and save that scene as a MB or MA file.
- Create a new scene, and reference the MB or MA file from step 1 twice. It must be the same MB or MA file, not different files.
- Save the scene, reset Maya to a new scene, and then open the saved scene.
- Maya will crash.
Expected behavior
Maya should open a scene with multiple references to an external file containing a mayaUsdProxyShape.
Specs (if applicable):
- Windows 10
- Maya 2022.5 and 2024.2
- maya_usd-0.26.0 and maya_usd-0.30.0
Additional context
We have debugged it down to this line :
maya-usd/lib/mayaUsd/nodes/proxyAccessor.cpp
Line 743 in dc07abd
MPlug forceCompute(node, _forceCompute); |
I think what is happening is _forceCompute is not defined at this stage. When we have multiple references to the same file, somehow this ends up not defined.
Instead of getting the MPlug directly, you can turn the MObject into a MFnDependencyNode and use findPlug with the attribute name as a MString. This is safe and doesn't cause the crash on load.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working