Skip to content

Commit 5f19fed

Browse files
committed
Addressed code review feedback.
1 parent f04626d commit 5f19fed

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

doc/selectionHighlightingArchitecture.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,23 @@ selected prims. It can also query the *selections* data source on a prim to det
111111
particular application's representation of selection.
112112

113113
- **Plugins create and register a path mapper object** to translate application
114-
selection paths to Hydra scene index prim selection paths.
114+
selection paths to Hydra scene index prim selection paths. Application
115+
paths are described through the Universal Front End API, with
116+
`Ufe::Path`, and Hydra scene index prim paths are described with OpenUSD
117+
`SdfPath`. A selection in the application must be translated to a
118+
selection in the Hydra scene graph, using a path mapper.
119+
120+
For example, consider a USD stage rooted at application path
121+
`|stage1|stageShape1`, and a USD prim `/Cube1` in that stage. This is
122+
described in the application by the `Ufe::Path` `|stage1|stageShape1,/Cube1`.
123+
Its corresponding Hydra prim path might be
124+
`/MayaUsdProxyShape_PluginNode/mayaUsdProxyShape1/Cube1`. A Hydra USD data
125+
producer plugin can register a path mapper that converts all `Ufe::Path` that
126+
begin with path prefix `|stage1|stageShape1` to Hydra scene index
127+
prim paths that begin with the `SdfPath` prefix
128+
`/MayaUsdProxyShape_PluginNode/mayaUsdProxyShape1`, so that
129+
`|stage1|stageShape1,/Cube1` gets mapped into
130+
`/MayaUsdProxyShape_PluginNode/mayaUsdProxyShape1/Cube1`.
115131

116132
## Implementation
117133

lib/mayaHydra/hydraExtensions/sceneIndex/mhMayaUsdProxyShapeSceneIndex.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ MayaUsdProxyShapeSceneIndex::MayaUsdProxyShapeSceneIndex(
147147
const HdSceneIndexBaseRefPtr& sceneIndexChainLastElement,
148148
const UsdImagingStageSceneIndexRefPtr& usdImagingStageSceneIndex,
149149
const MObjectHandle& dagNodeHandle,
150-
const PXR_NS::SdfPath& sceneIndexPathPrefix,
150+
const SdfPath& sceneIndexPathPrefix,
151151
const Ufe::Path& sceneIndexAppPath)
152152
: ParentClass(sceneIndexChainLastElement)
153153
, InputSceneIndexUtils(sceneIndexChainLastElement)
@@ -212,7 +212,7 @@ MayaUsdProxyShapeSceneIndexRefPtr MayaUsdProxyShapeSceneIndex::New(
212212
const HdSceneIndexBaseRefPtr& sceneIndexChainLastElement,
213213
const UsdImagingStageSceneIndexRefPtr& usdImagingStageSceneIndex,
214214
const MObjectHandle& dagNodeHandle,
215-
const PXR_NS::SdfPath& sceneIndexPathPrefix,
215+
const SdfPath& sceneIndexPathPrefix,
216216
const Ufe::Path& sceneIndexAppPath)
217217
{
218218
return TfCreateRefPtr(new MayaUsdProxyShapeSceneIndex(proxyStage, sceneIndexChainLastElement, usdImagingStageSceneIndex, dagNodeHandle, sceneIndexPathPrefix, sceneIndexAppPath));

0 commit comments

Comments
 (0)