-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MAYA-121532 push/pull: usdeditAsMaya set should be a locked node #2290
Conversation
@@ -365,8 +365,8 @@ PullImportPaths pullImport( | |||
MStatus status = UsdMayaUtil::GetMObjectByName(kPullSetName, pullSetObj); | |||
if (status != MStatus::kSuccess) { | |||
MString createSetCmd; | |||
createSetCmd.format("sets -em -name \"^1s\";", kPullSetName.asChar()); | |||
MDGModifier& dgMod = MDGModifierUndoItem::create("Pull import pull set creation"); | |||
createSetCmd.format("sets -em -name \"^1s\";lockNode \"^1s\";", kPullSetName.asChar()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to be working with the tests I did, but is it ok for the undo/rebo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It depends if the command itself is undoable. The docs for MDGModifier says:
The command should be fully undoable, otherwise unpredictable behaviour
may result. For example, assume that the command is a MEL procedure
which contains some undoable commands and some non-undoable commands.
When doIt() is first called, the procedure will be executed and all of
its commands will take effect. If undoIt() is subsequently called, only
the undoable portions of the script will be undone, which may leave Maya
in an unstable or inconsistent state. Any subsequent calls to doIt() will
only redo the commands which were undone, the non-undoable portions
will not be re-executed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be hard to test it anyway, since the undo will delete the set, so you cannot check if it unlocked properly, but then it does not matter since the set is gone, so it should be fine. If the units tests about undo/redo of editAsMaya pass, then it should be fine.
Only PF failure is known: MayaUsd - Maya Master [USD max, Python 3, Interactive] - Branch Preflight (Linux) - Build #1068 - FAILURE: |
No description provided.