Skip to content
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

Merged

Conversation

AramAzhari-adsk
Copy link
Collaborator

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

…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
Copy link
Collaborator

@pierrebai-adsk pierrebai-adsk left a 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.

pierrebai-adsk
pierrebai-adsk previously approved these changes Jan 26, 2023
@@ -10,6 +10,7 @@
#include "warningDialogs.h"

#include <mayaUsd/base/tokens.h>
#include <mayaUsd/fileio/jobs/jobArgs.h>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this include necessary?

Copy link
Collaborator Author

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.

vlasovi
vlasovi previously approved these changes Jan 26, 2023
Copy link
Collaborator

@vlasovi vlasovi left a 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

@AramAzhari-adsk AramAzhari-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Jan 26, 2023
@seando-adsk seando-adsk merged commit e2fee47 into dev Jan 27, 2023
@seando-adsk seando-adsk deleted the azharia/MAYA-127327/usd-layer-editor-rootlayer-save-crashfix branch January 27, 2023 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adsk Related to Autodesk plugin ready-for-merge Development process is finished, PR is ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants