浏览代码

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

Tommy 7 年之前
父节点
当前提交
a9d70b2dbc
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      code/FBXConverter.cpp

+ 8 - 0
code/FBXConverter.cpp

@@ -236,6 +236,14 @@ void Converter::ConvertNodes( uint64_t id, aiNode& parent, const aiMatrix4x4& pa
 
                         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)