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

Don't clear selection list before file save #30

Open
alekamca opened this issue Dec 1, 2017 · 1 comment
Open

Don't clear selection list before file save #30

alekamca opened this issue Dec 1, 2017 · 1 comment

Comments

@alekamca
Copy link
Contributor

alekamca commented Dec 1, 2017

There is a callback registered here: https://github.com/AnimalLogic/AL_USDMaya/blob/develop/lib/AL_USDMaya/AL/usdmaya/Global.cpp#L140
which clears the selection list before file save. I see from the comment why this is necessary, but this affects all scenes after the AL usdmaya plugin has been loaded, even scenes which do not have any AL nodes. I believe there is a much more surgical approach to this that could be applied (e.g., only deselecting what is necessary, or not allowing transient nodes to be stored in the Maya file via MPxNode::setDoNotWrite).

FYI: our current use case does not create transient nodes, so I'm just disabling the callback in our local version, but this is not a long term solution.

@wnxntn
Copy link

wnxntn commented Apr 6, 2018

As mentioned above, the selection is cleared in preFileSave()

This deviates from the expected Maya behaviour and breaks selection-based publishers

We are planning a solution where we store the selection list in preFileSave() (ignoring AL_USD proxies as they will never be part of selection-based publishes),still clear the selection list, and subsequently restore the selection in postFileSave().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants