-
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
Fixes an issue on layer editor when trying to save a root layer directly (by right clicking on the layer and Save As.), where an invalid extension could cause a crash. The fallback is .usd. #2847
Fixes an issue on layer editor when trying to save a root layer directly (by right clicking on the layer and Save As.), where an invalid extension could cause a crash. The fallback is .usd. #2847
Conversation
…tly (by right clicking on the layer and Save As.), where an invalid extension could cause a crash. The fallback is .usd. It also blocks the path that will result in the crash for any other scenario where the file cannot be opened after it was exported. The user is then displayed a message dialog indicating the layer saving was not successful.
…r-save-crashfix # Conflicts: # lib/usd/ui/layerEditor/layerTreeItem.cpp
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.
Almost there, just a few improvements that I think would be worthwhile.
@@ -10,6 +10,7 @@ | |||
#include "warningDialogs.h" | |||
|
|||
#include <mayaUsd/base/tokens.h> | |||
#include <mayaUsd/fileio/jobs/jobArgs.h> |
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.
Is this include necessary?
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.
This is no longer necessary as the function now lives in utilSerialization. I'll remove it.
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 think including "mayaUsd/fileio/jobs/jobArgs.h" is not necessary. Otherwise looks good
2592f5c
Fixes an issue on layer editor when trying to save a root layer directly (by right clicking on the layer and Save As.), where an invalid extension could cause a crash. The fallback is .usd.
It also blocks the path that will result in the crash for any other scenario where the file cannot be opened after it was exported. The user is then displayed a message dialog indicating the layer saving was not successful.
Similar PR: #2845