-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EMSUSD-623 edit as Maya multiple variants
This change adds support to edit-as-Maya a prim that is under a variant, with each variation having a different Maya reference. That is, a single prim can now be edited-as-Maya multiple times in parallel. This required major changes on how those edited prim are tracked. Edit-as-Maya authors data in the session layer related to the edited prim. Previously, this data was authored outside any variant, which caused problems when a prim had multiple variants. Now these data are authored inside the same variant as the prim itself. Additional helper functions: - Add the getEditTargetForVariants function helper function to create the USD edit target targeting all the variants that affect a given prim. - Add variant-specific pull info metadata in the pull-info helper functions. Change to the orphan manager: - Use the variant-targeting helper function when authoring the Maya reference custom attribute that holds the name of the Maya reference node. - Support having multiple entries for a given UFE path. - To differentiate between entries, the corresponding root Maya DAG path must be given in all functions to figure out which version of the prim we are dealing with. - Fortunately, all callers always have on hand the DAG path of the root Maya node. - Change all implementation function to iterate over these variations. - Change the orphaned nodes serialization to support the extra data. - Make the serialization format backward compatible by special-casing the usual case of having a single variation at a given edited UFE path. - Add a log to tell the user when an edited prim is orphaned. Changes to the prim updater manager: - Ignore edited prim that are orphaned when determining if a prim has edited descendants. - Adapt to changes to the orphaned manager by passing the Maya DAG path to the root of the edited nodes. Changes to Maya reference translator (importer from USD to Maya): - Use the variant-targeting helper function when authoring the pulled-prim metadata. - Make many functions be purely in the implementation instead of declared private in the class. - This allows better hiding of the implementation. - This was also necessary to make the function callable from internal implementation functions. - Renamed LoadMayaReference to CreateMayaReference to better reflect what the function does. - Split the long update function into multiple function for clarity. - When trying to reuse Maya reference nodes, verify that the referenced file is the one that was expected. - This allows two prim with the same USD path but different references to work alongside each other. - This happens when one prim with two variants each contain a Maya reference. - Add more comments in the code to explain what is going on. - Add a log to tell the user when a reference does not have the expected file path.
- Loading branch information
1 parent
b48151b
commit 41bfa0f
Showing
10 changed files
with
462 additions
and
198 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.