소스 검색

Added name to nodes

Alexis Breust 7 년 전
부모
커밋
4aaf7ad547
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      code/glTF2Exporter.cpp

+ 3 - 1
code/glTF2Exporter.cpp

@@ -759,7 +759,7 @@ void glTF2Exporter::ExportMeshes()
 			if (c)
 			if (c)
 				p.attributes.color.push_back(c);
 				p.attributes.color.push_back(c);
 		}
 		}
-		
+
 		/*************** Vertices indices ****************/
 		/*************** Vertices indices ****************/
 		if (aim->mNumFaces > 0) {
 		if (aim->mNumFaces > 0) {
 			std::vector<IndicesType> indices;
 			std::vector<IndicesType> indices;
@@ -891,6 +891,8 @@ unsigned int glTF2Exporter::ExportNodeHierarchy(const aiNode* n)
 {
 {
     Ref<Node> node = mAsset->nodes.Create(mAsset->FindUniqueID(n->mName.C_Str(), "node"));
     Ref<Node> node = mAsset->nodes.Create(mAsset->FindUniqueID(n->mName.C_Str(), "node"));
 
 
+    node->name = n->mName.C_Str();
+
     if (!n->mTransformation.IsIdentity()) {
     if (!n->mTransformation.IsIdentity()) {
         node->matrix.isPresent = true;
         node->matrix.isPresent = true;
         CopyValue(n->mTransformation, node->matrix.value);
         CopyValue(n->mTransformation, node->matrix.value);