Skip to content

Commit 7a58cfe

Browse files
committed
use CLI args for TestUSDSceneHierarchy
1 parent ee60f8a commit 7a58cfe

File tree

3 files changed

+2
-24
lines changed

3 files changed

+2
-24
lines changed

application/testing/tests.usd.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ f3d_test(NAME TestUSDZMaterials DATA McUsd.usdz PLUGIN usd ARGS --camera-positio
2121
f3d_test(NAME TestUSDZMaterialsInterationReload DATA McUsd.usdz PLUGIN usd INTERACTION NO_BASELINE) # Up
2222

2323
# Scene hierarchy test for USD importer
24-
f3d_test(NAME TestUSDSceneHierarchy DATA primitives.usda PLUGIN usd INTERACTION UI) # Shift+H
24+
f3d_test(NAME TestUSDSceneHierarchy DATA primitives.usda ARGS --scene-hierarchy PLUGIN usd UI)
2525

2626
if(NOT F3D_MACOS_BUNDLE)
2727
file(COPY "${F3D_SOURCE_DIR}/plugins/usd/configs/config.d/" DESTINATION "${CMAKE_BINARY_DIR}/share/f3d/configs/config_build.d")

plugins/usd/module/vtkF3DUSDImporter.cxx

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -178,19 +178,7 @@ class vtkF3DUSDImporter::vtkInternals
178178
}
179179

180180
// Create a valid node name (vtkDataAssembly requires valid XML names)
181-
std::string nodeName = name;
182-
if (nodeName.empty() || std::isdigit(static_cast<unsigned char>(nodeName[0])))
183-
{
184-
nodeName = "node_" + nodeName;
185-
}
186-
// Replace invalid characters
187-
for (char& c : nodeName)
188-
{
189-
if (!std::isalnum(static_cast<unsigned char>(c)) && c != '_')
190-
{
191-
c = '_';
192-
}
193-
}
181+
std::string nodeName = vtkDataAssembly::MakeValidNodeName(name.c_str());
194182

195183
int nodeId = hierarchy->AddNode(nodeName.c_str(), parentNodeId);
196184
hierarchy->SetAttribute(nodeId, "label", name.c_str());

testing/recordings/TestUSDSceneHierarchy.log

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)