-
Notifications
You must be signed in to change notification settings - Fork 202
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-498] Could we have an option to tell mayaUsdMergeToUsd command not to author variant selections to edit target by default? #3261
Comments
Having recently bumped up to the latest version of MayaUsd, we were also surprised to see this new behavior. It really breaks everything we have in place and we resorted to modifying the source code to turn it off. I second the option to turn it off. |
I have logged this internally so that we can have a look and hopefully get this behavior changed. |
To understand what is going on and what the desired behaviour would be, I would need to see what the scene being edited looks like. The intention of the code that was added was to merge the edits into the variants where they came from. So that if we edit /A{variant one}/B{variant yellow}/C, when we merge the edits, the change go into the same variants they were in. As far as I understand what is being requested, it seems that the original USD prims being edited were under a variant but you would want the newly authored values to not be in the variant? Do I I understand the reported problem correctly? PS: having an example scene that shows the problem would help understand the hierarchy of prims and layers and how they interact with variants. |
Hi Pierre, you could use the example files from this issue I created #3243. I can see authoring the variant selection opinions in the same layer that has other opinions (i.e., transformations) can be useful in some workflow, but in our workflow, we tend to store the variant selection opinions in a separate layer (we store them in session layers and save them with the proxy shape at Maya save) for flexibility. Additionally, we manipulate the opinions in layers a lot in our pipeline, and having the variant selection opinions in the layers would make accessing the opinions more difficult as you would need to specify the right variant in order to access a prim's opinions in layers. I think, by providing an option to turn off saving variant selection opinions with other opinions in the same layer when merging back to USD from Maya, it would give clients an option to opt out if their pipelines don't benefit from this behaviour. |
OK, that confirms my understanding and is what I created as a unit test. Check out this PR that got merged recently and adds the flag to the mayaUsdMergeToUsd command: #3324 The flag is not yet used by the MayaUSD plugin and there is no option in the UI to turn it on when merging to USD using the menus, but it is at least available to scripting. The default is still to author in variants. If you need a different default, for now you could only modify the default in the source code. If we add a UI in the future, we would probably have a Maya option var where it is saved, so if a UI gets added in the future, you could set the option var once and have the default you want. For now only the new flag on teh command has been implemented. |
Thank you for implementing this feature, @pierrebai-adsk . I'll try to test the feature when I get a chance. In the meantime, we can close the issue I think. |
Is your feature request related to a problem? Please describe.
Hi, we found out that
mayaUsdMergeToUsd
command will author variant information in edit target layer which it didn't do previously. This feature seems to be turning on by default by checking the source code:https://github.com/Autodesk/maya-usd/blob/dev/lib/usd/utils/MergePrims.cpp#L1008-L1012
https://github.com/Autodesk/maya-usd/blob/dev/lib/usd/utils/MergePrimsOptions.h#L108
I was wondering if we could have an option to turn this behaviour off so that it doesn't author variant information? i.e., exposing it to
mayaUsdMergeToUsd
command arguments and whatnot. In our pipeline, we normally author variant information in a separate layer because it gives us more flexibility.Below are an example of a layer authored by
mayaUsdMergeToUsd
command that has variant information and a layer without variant information for comparison.With variant information:
and the following is the one without variant information which was the previous behaviour:
Describe the solution you'd like
Have a way for clients to not author variant information into edit target layer when running
mayaUsdMergeToUsd
command. For instance, adding an argument tomayaUsdMergeToUsd
command to turn it on/off. Or any other ways that clients can control.The text was updated successfully, but these errors were encountered: