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

Method CreateAnimationSelection

IO/Geometry/vtkGLTFReader.cxx:1099–1116  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1097
1098//------------------------------------------------------------------------------
1099void vtkGLTFReader::CreateAnimationSelection()
1100{
1101 if (this->Loader == nullptr || this->Loader->GetInternalModel() == nullptr)
1102 {
1103 vtkErrorMacro("Error while accessing animations: model is not loaded");
1104 return;
1105 }
1106 this->AnimationSelection = vtkSmartPointer<vtkDataArraySelection>::New();
1107 std::map<std::string, unsigned int> duplicateNameCounters;
1108 for (const auto& animation : this->Loader->GetInternalModel()->Animations)
1109 {
1110 this->AnimationSelection->AddArray(
1111 MakeUniqueNonEmptyName(animation.Name, duplicateNameCounters).c_str(), false);
1112 }
1113 this->PreviousAnimationSelection = vtkSmartPointer<vtkDataArraySelection>::New();
1114 this->PreviousAnimationSelection->CopySelections(this->AnimationSelection);
1115 this->AnimationSelection->AddObserver(vtkCommand::ModifiedEvent, this, &vtkGLTFReader::Modified);
1116}
1117
1118//------------------------------------------------------------------------------
1119void vtkGLTFReader::SetApplyDeformationsToGeometry(bool flag)

Callers 1

RequestInformationMethod · 0.95

Calls 7

MakeUniqueNonEmptyNameFunction · 0.85
GetInternalModelMethod · 0.80
CopySelectionsMethod · 0.80
NewFunction · 0.50
AddArrayMethod · 0.45
c_strMethod · 0.45
AddObserverMethod · 0.45

Tested by

no test coverage detected