-
Notifications
You must be signed in to change notification settings - Fork 195
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
EMSUSD-1091 Save and restore non local edit target layer and anonymous layer #3716
base: dev
Are you sure you want to change the base?
Conversation
Hi @neilh-adsk @wallworm, let me know if you have any chance to take a look, cheers! |
Our team is going to be talking about this early next week. |
@csyshing Just to keep you updated. Before proceeding with code review we will creating an internal build and send it to our QA for some testing. |
@seando-adsk No problem and no rush, happy to discuss if any concerns. |
Hi @csyshing, During my testing I found an issue where if I lock or mute one of the layers that is above the non local target and save the file. Maya will lock up causing me to need to end the task for Maya to close it out.
nonLocalTest.mp4 |
Hi @santosd , thanks for the feedback, I will be on leave, so probably won't be able to send update soon, but I will take a look as soon as I can. |
On my testing, I also found another issue with the file locks. It seems our current logic for when all layers are locked will bypass this code and take over. CUrrently, our logic deals with situations when all layers are locked, and we target the session layer - if that situation is present, we will force the session layer to be the target, reproducing the original issue. to reproduce this case:
This same behavior will happen if a system lock changes before the maya File is reloaded. which seems to indicate that it's a conflict with our logic on scene load, rather than on file save. this also seems ot get maya on a state that isn't very stable as i crashed soon after reloading the file. I was also able to reproduce the crash @santosd mentioned above. |
This PR aims to fix issue-3637, the changes include three different but still highly related problems all together, I have split them to cover their own problems and added unit test accordingly:
stage->GetLayerStack()
to bestage->GetUsedLayers()
to include reference layers and their sub layers which are not visible in local layer stack;copyTargetLayerToAttribute()
andfindPrimNode()
functions in fileutils/targetLayer.cpp
, it has assumption that: if a non local edit target layer can be constructed by a PrimNode, there must be at least one valid prim path contributes to the final composition, which must be able to find it at the time when reopening, this is the reason the code serializes one reference prim path incopyTargetLayerToAttribute()
function atutils/targetLayer.cpp#L141
, and will need it to reconstruct the edit target ingetEditTargetFromAttribute()
function at line 233.test/lib/mayaUsd/fileio/testNonLocalEditTargetLayer.py
has been provided to demo the typical use case we have.