Added support for heterogenous metadata on the aiNodes.
This commit is contained in:
@@ -726,16 +726,12 @@ aiNode* ProcessSpatialStructure(aiNode* parent, const IfcProduct& el, Conversion
|
||||
aiMetadata* data = new aiMetadata();
|
||||
data->mNumProperties = properties.size();
|
||||
data->mKeys = new aiString[data->mNumProperties]();
|
||||
data->mValues = new aiString[data->mNumProperties]();
|
||||
data->mValues = new aiMetaDataEntry[data->mNumProperties]();
|
||||
|
||||
unsigned int index = 0;
|
||||
BOOST_FOREACH(const Metadata::value_type& kv, properties)
|
||||
data->Set(index++, kv.first, aiString(kv.second));
|
||||
|
||||
unsigned int i = 0;
|
||||
BOOST_FOREACH(const Metadata::value_type& kv, properties) {
|
||||
data->mKeys[i].Set(kv.first);
|
||||
if (kv.second.length() > 0) {
|
||||
data->mValues[i].Set(kv.second);
|
||||
}
|
||||
++i;
|
||||
}
|
||||
nd->mMetaData = data;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user