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

MAYA-128199 fix error on save #3004

Merged
merged 3 commits into from
Apr 4, 2023
Merged

Conversation

pierrebai-adsk
Copy link
Collaborator

@pierrebai-adsk pierrebai-adsk commented Apr 3, 2023

The problem was that when saving an anonynous layer, the stage changes since the root layer changes identity. We need to set the target layer, but not on the current stage, but on the new computed stage.

Also, I added error messages when a save operation fails.

  • Add a helper function to retrieve the proxy shape node from its node name.
  • Pass the new layer to the helper function that sets the new proxy path of the proxy shape.
  • Make sure that all layer info contain the proxy shape path since it is needed to update the target layer when a target anonymous layer is saved.
  • Renamed the saveRootLayer function to updateRootLayer since it is not saving the layer, it is updating the proxy shape.

The problem was that when saving an anoynous layer, the stage changes since the root layer changes identity. We need to set the target layer, but not on the current stage, but on the new computed stage.

Also, I added error messages when a save operation fails.

- Add a helper function to retrieve the proxy shape node from its node name.
- Pass the new layer to the helper function that sets the new proxy path of the proxy shape.
- Make sure that all layer info contain th eproxy shape path since it is needed to update the target layer when a target anonymous layer is saved.
- Renamed the saveRootLayer function to updateRootLayer since it is not saving the layer, it is updating the proxy shape.
@pierrebai-adsk pierrebai-adsk added the adsk Related to Autodesk plugin label Apr 3, 2023
@pierrebai-adsk pierrebai-adsk changed the title MAYA-128199 fix erro on save MAYA-128199 fix error on save Apr 4, 2023
@pierrebai-adsk pierrebai-adsk requested a review from vlasovi April 4, 2023 13:13
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.

Looks good

@pierrebai-adsk pierrebai-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Apr 4, 2023
@seando-adsk seando-adsk merged commit aa84ca4 into dev Apr 4, 2023
@seando-adsk seando-adsk deleted the bailp/MAYA-128199/error-on-save branch April 4, 2023 16:32
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.

4 participants