diff --git a/irr/include/SkinnedMesh.h b/irr/include/SkinnedMesh.h index 98cefc858..3ae6aa2a3 100644 --- a/irr/include/SkinnedMesh.h +++ b/irr/include/SkinnedMesh.h @@ -329,8 +329,6 @@ public: return {trs}; } - //! List of child joints - std::vector Children; //! List of attached meshes std::vector AttachedMeshes; diff --git a/irr/src/CXMeshFileLoader.cpp b/irr/src/CXMeshFileLoader.cpp index eeab4cfb9..69ab2d0ca 100644 --- a/irr/src/CXMeshFileLoader.cpp +++ b/irr/src/CXMeshFileLoader.cpp @@ -528,8 +528,6 @@ bool CXMeshFileLoader::parseDataObjectFrame(SkinnedMesh::SJoint *Parent) #ifdef _XREADER_DEBUG os::Printer::log("using joint ", name.c_str(), ELL_DEBUG); #endif - if (Parent) - Parent->Children.push_back(joint); } // Now inside a frame. diff --git a/src/unittest/test_irr_gltf_mesh_loader.cpp b/src/unittest/test_irr_gltf_mesh_loader.cpp index bc49b8896..6884fe0fe 100644 --- a/src/unittest/test_irr_gltf_mesh_loader.cpp +++ b/src/unittest/test_irr_gltf_mesh_loader.cpp @@ -404,12 +404,12 @@ SECTION("simple skin") }; // Check the node hierarchy - const auto parent = findJoint([](auto joint) { - return !joint->Children.empty(); + const auto *parent = findJoint([](auto *joint) { + return !joint->ParentJointID; + }); + const auto child = findJoint([&](auto *joint) { + return joint->ParentJointID && *joint->ParentJointID == parent->JointID; }); - REQUIRE(parent->Children.size() == 1); - const auto child = parent->Children[0]; - REQUIRE(child != parent); SECTION("transformations are correct") {