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-128907 fix layer parenting of relative layers #3141

Merged
merged 2 commits into from
Jun 7, 2023

Conversation

pierrebai-adsk
Copy link
Collaborator

When a layers is saved as relative to its parent just before tryign to reparenting it to anotehr layer, the parenting would fail. That was because the layer identifier use inside the layer itself was relative, which prevented finding the layer afterward.

The problem goes away when the stage is reloaded because when loading relative layers, it correctly set the lauer identifier to its absolute path.

Fix the problem for recently-saved layers by making sure its identifier uses the absolute path, not the relative path.

When a layers is saved as relative to its parent just before tryign to reparenting it to anotehr layer, the parenting would fail. That was because the layer identifier use inside the layer itself was relative, which prevented finding the layer afterward.

The problem goes away when the stage is reloaded because when loading relative layers, it correctly set the lauer identifier to its absolute path.

Fix the problem for recently-saved layers by making sure its identifier uses the absolute path, not the relative path.
@pierrebai-adsk pierrebai-adsk added bug Something isn't working adsk Related to Autodesk plugin labels Jun 6, 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.

Looks good. When I was working around that code, I had a thought that doing this trick with temporary current directory wasn't right. Glad that we fixed that.

@pierrebai-adsk pierrebai-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Jun 6, 2023
@seando-adsk seando-adsk merged commit cfe5053 into dev Jun 7, 2023
@seando-adsk seando-adsk deleted the bailp/MAYA-128907/drag-and-drop-relative branch June 7, 2023 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adsk Related to Autodesk plugin bug Something isn't working 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