-
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
EMSUSD-1017 Fix reverting multiple files #3625
Conversation
cbd8e12
to
96feace
Compare
When reverting multiple USD layers, reverting the first layer would trigger the UI to update, thus making the the element holding the other layers invalid before they were processed. To avoid this, add a mechanism to delay the execution of commands in the command-hook so that all item can be processed before the first command is executed. In the Maya implementation of the command hook, the MEL and Python commands are accumulated when the commands are delayed and executed once the delayed commands are triggered.
96feace
to
31620d7
Compare
} | ||
} | ||
|
||
void MayaCommandHook::executeDelayedCommands() |
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.
Would you mind adding a comment that this function should not be called directly?
MGlobal::executeCommand( | ||
MString(commandString.c_str()), | ||
result, | ||
/*display*/ true, |
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.
Do we always want to have display on?
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 was like that in the existing code that I moved here from the top of the file.
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.
LGTM
When reverting multiple USD layers, reverting the first layer would trigger the UI to update, thus making the the element holding the other layers invalid before they were processed.
To avoid this, add a mechanism to delay the execution of commands in the command-hook so that all item can be processed before the first command is executed.
In the Maya implementation of the command hook, the MEL and Python commands are accumulated when the commands are delayed and executed once the delayed commands are triggered.