Conversation
Before this change, only the topmost DAG paths that UsdMaya_ReadJob::Read returns were customized. For example, editing an ancestor of a MayaReference prim did not call PxrUsdTranslators_MayaReferenceUpdater::editAsMaya(), leaving every attribute of that reference editable. Now we traverse the pulled subtree on the stage, looking up each prim by its path in the read job's GetNewNodeRegistry() to get its Maya node. Each node found is then used to call UsdMayaPrimUpdater::editAsMaya(). As a result, pullCustomize() now covers the whole hierarchy, like pushCustomize() and discardPrimEdits() already do.
…Customize addExcludeFromRendering() deactivates the pulled prim. Calling it from pullImport() meant pullCustomize() ran while that prim was inactive, so its descendants did not resolve on the stage. UsdMayaPrimUpdater::getUsdPrim() returned an invalid prim for them. It is now called from editAsMaya(), after pullCustomize(). This matches mergeToUsd(), which calls removeExcludeFromRendering() before pushCustomize().
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR changes
PrimUpdaterManager::editAsMayaso that it calls theUsdMayaPrimUpdater::editAsMayaper-prim customization hook on the whole pulled prim subtree. Before, only the topmost pulled DAG path was customized.We hit this with an in-house updater, but it also affects workflow with a built-in one: editing as Maya an ancestor of a
MayaReferenceprim did not callPxrUsdTranslators_MayaReferenceUpdater::editAsMaya(), so its attribute specific locking never ran and the stand-in transform stayed fully editable.This aligns
editAsMayawith what the other actions already do:mergeToUsdcallsUsdMayaPrimUpdater::pushCopySpecs()on all the prims exported to USD, anddiscardEditscallsUsdMayaPrimUpdater::discardEdits()on the whole pulled DAG hierarchy.Changes
pullImport()so that it runs afterpullCustomize(). The subtree then stays composed while the hooks run, so a nested updater can reach its prim throughgetUsdPrim(). This mirrorsmergeToUsd, which removes the exclusion beforepushCopySpecs().pushCustomize()andcanEditAsMaya()already do.