diff --git a/lib/mayaHydra/hydraExtensions/sceneIndex/registration.cpp b/lib/mayaHydra/hydraExtensions/sceneIndex/registration.cpp index 31fb2b08a..a658add68 100644 --- a/lib/mayaHydra/hydraExtensions/sceneIndex/registration.cpp +++ b/lib/mayaHydra/hydraExtensions/sceneIndex/registration.cpp @@ -162,9 +162,11 @@ class PathInterfaceSceneIndex : public Fvp::PathInterfaceSceneIndexBase instanceSelection = {instancerPath, prototypeIndex, {instanceSchema.GetInstanceIndex()->GetTypedValue(0)}}; } - auto targetChildPath = primPath.AppendChild(TfToken(secondSegment.components()[iComponent].string())); + // SdfPath components cannot be numeric. This happens with point instance selections. + auto targetChildPath = ((iComponent == lastComponentIndex) && lastComponentIsNumeric) ? SdfPath() : + primPath.AppendChild(TfToken(secondSegment.components()[iComponent].string())); auto actualChildPaths = GetInputSceneIndex()->GetChildPrimPaths(primPath); - if (std::find(actualChildPaths.begin(), actualChildPaths.end(), targetChildPath) != actualChildPaths.end()) { + if (!targetChildPath.IsEmpty() && std::find(actualChildPaths.begin(), actualChildPaths.end(), targetChildPath) != actualChildPaths.end()) { // Append if the new path is valid primPath = targetChildPath; }