浏览代码

Collada mesh name is copied from id only if there was no name attribute in the <geometry> node.

Sherief Farouk 12 年之前
父节点
当前提交
d23430c4bd
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      code/ColladaLoader.cpp

+ 4 - 1
code/ColladaLoader.cpp

@@ -521,7 +521,10 @@ void ColladaLoader::BuildMeshesForNode( const ColladaParser& pParser, const Coll
 
 
 				// assign the material index
 				// assign the material index
 				dstMesh->mMaterialIndex = matIdx;
 				dstMesh->mMaterialIndex = matIdx;
-        dstMesh->mName = mid.mMeshOrController;			
+                if(dstMesh->mName.length == 0)
+                {
+                    dstMesh->mName = mid.mMeshOrController;
+                }
       }
       }
 		}
 		}
 	}
 	}