Skip to content

Commit

Permalink
EMSUSD-987 undo edit prototype
Browse files Browse the repository at this point in the history
Editing as Maya an instanced object and then undoing the edit-as-Maya would
crash. That was because when editing an instance, Maya nodes were briefly
created for the prototype, registered as newly-created nodes, then immediately
deleted. When undoing, the undo was trying to delete those non-existing nodes.

Fix by removing the deleted node from the map of created Maya nodes.
  • Loading branch information
pierrebai-adsk committed Feb 5, 2024
1 parent 9e5642f commit b1a164f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/mayaUsd/fileio/jobs/readJob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,7 @@ bool UsdMaya_ReadJob::_DoImport(UsdPrimRange& rootRange, const UsdPrim& usdRootP
}
}
deletePrototypeMod.deleteNode(prototypeObject, false);
mNewNodeRegistry.erase(prototypePath.GetString());
}
prototypesLoop.loopAdvance();
}
Expand Down

0 comments on commit b1a164f

Please sign in to comment.