From b1a164fefe3b20130b6a381126c77fa9b0701eaa Mon Sep 17 00:00:00 2001 From: Pierre Baillargeon Date: Mon, 5 Feb 2024 10:45:38 -0500 Subject: [PATCH] EMSUSD-987 undo edit prototype 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. --- lib/mayaUsd/fileio/jobs/readJob.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/mayaUsd/fileio/jobs/readJob.cpp b/lib/mayaUsd/fileio/jobs/readJob.cpp index fa0fef420f..9275414a3d 100644 --- a/lib/mayaUsd/fileio/jobs/readJob.cpp +++ b/lib/mayaUsd/fileio/jobs/readJob.cpp @@ -676,6 +676,7 @@ bool UsdMaya_ReadJob::_DoImport(UsdPrimRange& rootRange, const UsdPrim& usdRootP } } deletePrototypeMod.deleteNode(prototypeObject, false); + mNewNodeRegistry.erase(prototypePath.GetString()); } prototypesLoop.loopAdvance(); }