Add check for wall switch from cmake

This commit is contained in:
Kim Kulling
2022-09-17 18:16:42 +02:00
parent 1944c45944
commit b3c7bdbdd6
4 changed files with 31 additions and 12 deletions

View File

@@ -305,19 +305,16 @@ void FBXConverter::ConvertNodes(uint64_t id, aiNode *parent, aiNode *root_node)
}
}
if (nodes.size()) {
parent->mChildren = new aiNode *[nodes.size()]();
parent->mNumChildren = static_cast<unsigned int>(nodes.size());
for (unsigned int i = 0; i < nodes.size(); ++i)
{
parent->mChildren[i] = nodes[i].mOwnership.release();
}
nodes.clear();
} else {
if (nodes.empty()) {
parent->mNumChildren = 0;
parent->mChildren = nullptr;
}
parent->mChildren = new aiNode *[nodes.size()]();
parent->mNumChildren = static_cast<unsigned int>(nodes.size());
for (unsigned int i = 0; i < nodes.size(); ++i) {
parent->mChildren[i] = nodes[i].mOwnership.release();
}
}
void FBXConverter::ConvertLights(const Model &model, const std::string &orig_name) {