-
Notifications
You must be signed in to change notification settings - Fork 202
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-647 fix copying the proxy shape node #3489
Conversation
When Maya copies a Maya node, it actually export the selected nodes into a temporary file. When the node is a MayaUSD node, this export automatically prompt the user to save the dirty USD files. To avoid this, we now detect that we are exporting due to a copy operation and force saving the USD layer into the Maya scene file.
// When Maya is crashing or copying/cutting scene nodes, we don't want to | ||
// save the the USD file to avoid overwriting them with possibly unwanted | ||
// data. Instead, we will save the USD data inside the temporary crash recovery Maya file. | ||
if (isCrashing() || isCopyingSceneNodes()) { |
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.
Am I understanding correctly from the PR info
"we now detect that we are exporting due to a copy operation and force saving the USD layer into the Maya scene file."
that we are saving the layer into the Maya file without user knowing about it?
I thought the intention was to do nothing when that shortcut is called.
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.
Doing nothing would be hard because we are not in control. Hitting ctrl-C does a "selected export" in Maya in a hidden temp file.
My fix make copy/paste of shape node work.
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.
I asked David Santos about it on slack, and he said that my fix is OK and is probably what we want anyway.
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. To avoid any confusion, I recommend updating the description to include the word temp in the following:
" To avoid this, we now detect that we are exporting due to a copy operation and force saving the USD layer into the temporary crash recovery Maya scene file."
The first sentence of the description said that Maya saves the scene in a temporary file, I could repeat it again after to make it more clear. The scene is not a crash scene, it's just a hidden temp scene file used as the copy/paste data holder. |
When Maya copies a Maya node, it actually export the selected nodes into a temporary file. When the node is a MayaUSD node, this export automatically prompt the user to save the dirty USD files. To avoid this, we now detect that we are exporting due to a copy operation and force saving the USD layer into the temporary Maya scene file.