-
Notifications
You must be signed in to change notification settings - Fork 6
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
Replace DataProducersNodeHashCodeToSdfPathRegistry with path mapping. #247
Replace DataProducersNodeHashCodeToSdfPathRegistry with path mapping. #247
Conversation
_sceneIndexPathPrefix(sceneIndexPathPrefix) | ||
{} | ||
|
||
PrimSelections PrefixPathMapper::UfePathToPrimSelections(const Ufe::Path& appPath) const | ||
{ | ||
// We only handle scene items from our assigned run time ID. |
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.
One of the important changes in this pull request. Restricting the path mapper to only deal with one kind of UFE data model is overly restrictive, because the main point is mapping a Ufe::Path prefix into a Hydra scene index SdfPath prefix, regardless of which data model(s) are involved. This was making the path mapping overly complex.
// No need for a path mapper: the parts of the footprint are not selectable | ||
// individually, only the Maya shape, so the built-in Maya path mapper does | ||
// the job of path mapping for the footprint node. | ||
// Register a path mapper to map application UFE paths to scene index paths, |
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.
Remove reliance on DataProducersNodeHashCodeToSdfPathRegistry, use path mapping instead, as is done in FlowViewportAPILocator.
@@ -788,20 +790,15 @@ Fvp::PrimSelections MayaHydraSceneIndex::UfePathToPrimSelections(const Ufe::Path | |||
MDagPath shapeDagPath(dagPath); | |||
shapeDagPath.extendToShape(); | |||
|
|||
// Check if this Maya node has a special path mapper associated with 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.
Remove reliance on DataProducersNodeHashCodeToSdfPathRegistry, use path mapping instead.
@@ -331,18 +333,19 @@ Fvp::PrimSelections MayaUsdProxyShapeSceneIndex::UfePathToPrimSelections( | |||
const Ufe::Path& appPath | |||
) const | |||
{ | |||
// We only handle USD objects, so if the UFE path is not a USD object, |
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.
Remove single UFE run-time restriction, path mapping should only deal with paths.
@@ -1,5 +1,5 @@ | |||
// | |||
// Copyright 2024 Autodesk | |||
// Copyright 2025 Autodesk |
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 think you don't need to change the year since this file was created in 2024, but it's very minor.
In the code coverage build the DataProducersNodeHashCodeToSdfPathRegistry was not being cleared out properly on file new, and finding out why was challenging. Instead, use the path mapping infrastructure to avoid the need for DataProducersNodeHashCodeToSdfPathRegistry in the Maya scene index.