------------------------------------------------------------------------------
| 1097 | |
| 1098 | //------------------------------------------------------------------------------ |
| 1099 | void 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 | //------------------------------------------------------------------------------ |
| 1119 | void vtkGLTFReader::SetApplyDeformationsToGeometry(bool flag) |
no test coverage detected