-
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
MAYA-129169 correctly duplicate prim #3079
MAYA-129169 correctly duplicate prim #3079
Conversation
Correctly handle all these case: - Simple prim with a single opinion: simple copy of source layer into destination layer. - Prim with opinion in multiple local layers: marge all opinion in destination layer. - Prim containing a USD reference: keep the reference but do not copy the reference contents into the destination layer. - Prim containing a USD payload: keep the payload but do not copy the payload contents into the destination layer. - Prim inside a reference or payload: copy the reference or payload contents in the destination layer. The code changes are: - Move layer-related function from the geneic util.h header and C++ file to the more specific utils/layers.h header and C++ file. - Make the getLocalPrimStack function available publicly. - Add getPrimStackForLayers function to find where a prim has opinions in a setof layers. - Add a description for the USD implementation of the UFE duplicate command. - It explains that the command copies the local opinions of the prim where it is defined. - Add a unit test that verify that duplicating a prim containing a USD reference does not copy the contents of the reference in the copy. - Remove the LayerAndPath type and replace it with PrimSpecHandle. - Prim spec contain the necessary data, and more, so it is more versatile. - Change some function names to be clearer.
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.
Looks good
@@ -32,6 +32,17 @@ namespace MAYAUSD_NS_DEF { | |||
namespace ufe { | |||
|
|||
//! \brief UsdUndoDuplicateCommand | |||
//! | |||
//! \details The USD duplicate command copies all opinions related the the USD prim |
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.
small typo -> double "the"
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.
I'm okay if you fix this in a follow-up PR.
Correctly handle all these case:
The code changes are: