FBX Import: properly delete inverse geotrans nodes when not using them.

pull/1804/head
Tommy 2018-02-24 09:37:36 +01:00
parent c18a07e47f
commit a9d70b2dbc
1 changed files with 8 additions and 0 deletions

View File

@ -236,6 +236,14 @@ void Converter::ConvertNodes( uint64_t id, aiNode& parent, const aiMatrix4x4& pa
new_abs_transform *= postnode->mTransformation; new_abs_transform *= postnode->mTransformation;
} }
} else {
// free the nodes we allocated as we don't need them
Util::delete_fun<aiNode> deleter;
std::for_each(
post_nodes_chain.begin(),
post_nodes_chain.end(),
deleter
);
} }
// attach sub-nodes (if any) // attach sub-nodes (if any)