MCPcopy Create free account
hub / github.com/Kitware/VTK / CreateSceneNamesArray

Method CreateSceneNamesArray

IO/Geometry/vtkGLTFReader.cxx:1063–1079  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1061
1062//------------------------------------------------------------------------------
1063void vtkGLTFReader::CreateSceneNamesArray()
1064{
1065 if (this->Loader == nullptr || this->Loader->GetInternalModel() == nullptr)
1066 {
1067 vtkErrorMacro("Error while accessing scenes: model is not loaded");
1068 return;
1069 }
1070 this->SceneNames = vtkSmartPointer<vtkStringArray>::New();
1071 this->SceneNames->SetNumberOfComponents(1);
1072
1073 std::map<std::string, unsigned int> duplicateNameCounters;
1074
1075 for (const auto& scene : this->Loader->GetInternalModel()->Scenes)
1076 {
1077 this->SceneNames->InsertNextValue(MakeUniqueNonEmptyName(scene.Name, duplicateNameCounters));
1078 }
1079}
1080
1081//------------------------------------------------------------------------------
1082vtkStringArray* vtkGLTFReader::GetAllSceneNames()

Callers 1

RequestInformationMethod · 0.95

Calls 5

MakeUniqueNonEmptyNameFunction · 0.85
GetInternalModelMethod · 0.80
NewFunction · 0.50
SetNumberOfComponentsMethod · 0.45
InsertNextValueMethod · 0.45

Tested by

no test coverage detected