-
Notifications
You must be signed in to change notification settings - Fork 201
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-85 - As a user, I'd like my 'Merge as USD' edits to be specified as overs when authoring to a stronger layer #3173
Conversation
… overs but the node being copied as well, if required
That's a clever solution, but I do wonder what happens when we merge to the layer where the prim is defined. Do the "over" get merged and now the prim is pure-over and maybe does not exists anymore? I would like you to test it and see what happens. For example:
What happens to the sphere definition in the root layer? |
Oh, I just realized that the function will only create the over if the prim does not exist already. Forget it, your solution works. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I thought the fix would be much more complicated. Good thing it was assigned to you! I'm afraid I would have gone down the wrong path.
I do have a follow-up question: since the data in the temporary layer is defined as "def", don't we lose the "over" in the destination layer, getting over-written by the "def" during the merge? I think I'd like to have a unit-test to verify it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a unit test that merges into an empty, higher layer.
Something like:
- Create two layers
- Target the lower layer (least priority)
- Create a prim
- Target higer layer
- Edit as maya
- Move the prim as a Maya object
- Merge to USD
- Verify the lower layer in unchanged
- Verify that the higher layer has a "over"
There are multiple examples of something similar in testMergeToUsd.py
Yeah, you are right. It would be good to have this unit test. |
Behaviour of the function mergePrims in MergePrims.cpp was changed:
Before, the function SdfJustCreatePrimInLayer was called for the prim's parent. This way the required "overs" were created up to the prim's parent and therefore the prim itself was created as "def"
Now, we call SdfJustCreatePrimInLayer for the prim itself. This way we create all required "overs" including the prim itself, which is the right behaviour.