MCPcopy Create free account
hub / github.com/assimp/assimp / GetPropertyTable

Function GetPropertyTable

code/AssetLib/FBX/FBXDocumentUtil.cpp:94–121  ·  view source on GitHub ↗

------------------------------------------------------------------------------------------------ fetch a property table and the corresponding property template

Source from the content-addressed store, hash-verified

92// ------------------------------------------------------------------------------------------------
93// fetch a property table and the corresponding property template
94std::shared_ptr<const PropertyTable> GetPropertyTable(const Document& doc,
95 const std::string& templateName,
96 const Element &element,
97 const Scope& sc,
98 bool no_warn /*= false*/) {
99 const Element* const Properties70 = sc["Properties70"];
100 std::shared_ptr<const PropertyTable> templateProps = std::shared_ptr<const PropertyTable>(
101 static_cast<const PropertyTable *>(nullptr));
102
103 if (templateName.length()) {
104 PropertyTemplateMap::const_iterator it = doc.Templates().find(templateName);
105 if(it != doc.Templates().end()) {
106 templateProps = (*it).second;
107 }
108 }
109
110 if (!Properties70 || !Properties70->Compound()) {
111 if(!no_warn) {
112 DOMWarning("property table (Properties70) not found",&element);
113 }
114 if(templateProps) {
115 return templateProps;
116 } else {
117 return std::make_shared<const PropertyTable>();
118 }
119 }
120 return std::make_shared<const PropertyTable>(*Properties70,templateProps);
121}
122
123} // !Util
124} // !FBX

Callers 10

DeformerMethod · 0.85
NodeAttributeMethod · 0.85
ReadGlobalSettingsMethod · 0.85
AnimationCurveNodeMethod · 0.85
AnimationLayerMethod · 0.85
AnimationStackMethod · 0.85
MaterialMethod · 0.85
TextureMethod · 0.85
VideoMethod · 0.85
ModelMethod · 0.85

Calls 3

DOMWarningFunction · 0.85
CompoundMethod · 0.80
endMethod · 0.45

Tested by

no test coverage detected