From 324ce296a8fde6dbe58e8ed9ddf1ad0590b94961 Mon Sep 17 00:00:00 2001 From: T-rvw <429601557@qq.com> Date: Fri, 5 Jan 2024 16:48:44 +0800 Subject: [PATCH] remove skin related data in mesh --- .../HalfEdgeMesh/FbxToHEMToFbx/Main.cpp | 25 ++++---- private/Framework/ProcessorImpl.cpp | 2 +- .../Producers/FbxProducer/FbxProducerImpl.cpp | 62 +++++++++++++++++-- .../Producers/FbxProducer/FbxProducerImpl.h | 4 +- .../ProgressiveMesh/ProgressiveMeshImpl.cpp | 9 --- private/Scene/Mesh.cpp | 53 ---------------- private/Scene/MeshImpl.cpp | 34 ---------- private/Scene/MeshImpl.h | 36 +---------- private/Scene/SceneDatabaseImpl.h | 2 +- private/Scene/Skin.cpp | 1 + private/Scene/SkinImpl.h | 1 + public/Scene/APITypeTraits.inl | 5 +- public/Scene/Mesh.h | 11 ---- public/Scene/SceneDatabase.h | 1 + public/Scene/Skin.h | 1 + 15 files changed, 83 insertions(+), 164 deletions(-) diff --git a/examples/Prototype/HalfEdgeMesh/FbxToHEMToFbx/Main.cpp b/examples/Prototype/HalfEdgeMesh/FbxToHEMToFbx/Main.cpp index dbd1aba..ee9b5ad 100644 --- a/examples/Prototype/HalfEdgeMesh/FbxToHEMToFbx/Main.cpp +++ b/examples/Prototype/HalfEdgeMesh/FbxToHEMToFbx/Main.cpp @@ -6,9 +6,6 @@ #include "Scene/SceneDatabase.h" #include "Utilities/PerformanceProfiler.h" -namespace -{ - int main(int argc, char** argv) { // argv[0] : exe name @@ -37,17 +34,17 @@ int main(int argc, char** argv) } // Processing - for (const auto& mesh : pSceneDatabase->GetMeshes()) - { - cd::Mesh boundaryMesh = GenerateBoundaryMesh(mesh); - auto halfEdgeMesh = cd::HalfEdgeMesh::FromIndexedMesh(boundaryMesh); - assert(halfEdgeMesh.IsValid()); - - auto newMesh = cd::Mesh::FromHalfEdgeMesh(halfEdgeMesh); - newMesh.SetName(mesh.GetName()); - newMesh.SetID(pNewSceneDatabase->GetMeshCount()); - pNewSceneDatabase->AddMesh(cd::MoveTemp(newMesh)); - } + //for (const auto& mesh : pSceneDatabase->GetMeshes()) + //{ + // cd::Mesh boundaryMesh = GenerateBoundaryMesh(mesh); + // auto halfEdgeMesh = cd::HalfEdgeMesh::FromIndexedMesh(boundaryMesh); + // assert(halfEdgeMesh.IsValid()); + // + // auto newMesh = cd::Mesh::FromHalfEdgeMesh(halfEdgeMesh); + // newMesh.SetName(mesh.GetName()); + // newMesh.SetID(pNewSceneDatabase->GetMeshCount()); + // pNewSceneDatabase->AddMesh(cd::MoveTemp(newMesh)); + //} // Export { diff --git a/private/Framework/ProcessorImpl.cpp b/private/Framework/ProcessorImpl.cpp index a7d5a68..b5bbebd 100644 --- a/private/Framework/ProcessorImpl.cpp +++ b/private/Framework/ProcessorImpl.cpp @@ -277,7 +277,7 @@ void ProcessorImpl::FlattenSceneDatabase() for (uint32_t meshIndex = 0U; meshIndex < m_pCurrentSceneDatabase->GetMeshCount(); ++meshIndex) { cd::Mesh& mesh = meshes[meshIndex]; - if (0U != mesh.GetVertexInfluenceCount()) + if (mesh.GetSkinIDCount() > 0U) { // Don't need to support flatten SkinMesh currently. continue; diff --git a/private/Producers/FbxProducer/FbxProducerImpl.cpp b/private/Producers/FbxProducer/FbxProducerImpl.cpp index 45f6f73..d0de87b 100644 --- a/private/Producers/FbxProducer/FbxProducerImpl.cpp +++ b/private/Producers/FbxProducer/FbxProducerImpl.cpp @@ -1,10 +1,7 @@ #include "FbxProducerImpl.h" #include "Hashers/StringHash.hpp" -#include "Scene/MaterialTextureType.h" -#include "Scene/Mesh.h" #include "Scene/SceneDatabase.h" -#include "Scene/VertexFormat.h" #include @@ -316,11 +313,27 @@ void FbxProducerImpl::TraverseNodeRecursively(fbxsdk::FbxNode* pSDKNode, cd::Nod mesh.SetBlendShapeIDCount(blendShapeCount); for (int32_t blendShapeIndex = 0; blendShapeIndex < blendShapeCount; ++blendShapeIndex) { - const fbxsdk::FbxBlendShape* pBlendShape = static_cast(pFbxMesh->GetDeformer(blendShapeIndex, fbxsdk::FbxDeformer::eBlendShape)); + const auto* pBlendShape = static_cast(pFbxMesh->GetDeformer(blendShapeIndex, fbxsdk::FbxDeformer::eBlendShape)); mesh.SetBlendShapeID(blendShapeIndex, ParseBlendShape(pBlendShape, mesh, pSceneDatabase)); } } + // SkinMesh + if (IsOptionEnabled(FbxProducerOptions::ImportSkinMesh)) + { + auto& vertexFormat = mesh.GetVertexFormat(); + vertexFormat.AddAttributeLayout(cd::VertexAttributeType::BoneIndex, cd::AttributeValueType::Int16, cd::MaxBoneInfluenceCount); + vertexFormat.AddAttributeLayout(cd::VertexAttributeType::BoneWeight, cd::AttributeValueType::Float, cd::MaxBoneInfluenceCount); + + int32_t skinDeformerCount = pFbxMesh->GetDeformerCount(fbxsdk::FbxDeformer::eSkin); + mesh.SetSkinIDCount(skinDeformerCount); + for (int32_t skinIndex = 0; skinIndex < skinDeformerCount; ++skinIndex) + { + const auto* pSkin = static_cast(pFbxMesh->GetDeformer(skinIndex, fbxsdk::FbxDeformer::eSkin)); + mesh.SetSkinID(skinIndex, ParseSkin(pSkin, mesh, pSceneDatabase)); + } + } + pSceneDatabase->AddMesh(cd::MoveTemp(mesh)); } } @@ -707,6 +720,47 @@ cd::BlendShapeID FbxProducerImpl::ParseBlendShape(const fbxsdk::FbxBlendShape* p return blendShapeID; } +cd::SkinID FbxProducerImpl::ParseSkin(const fbxsdk::FbxSkin* pSkin, const cd::Mesh& sourceMesh, cd::SceneDatabase* pSceneDatabase) +{ + assert(pSkin); + + cd::SkinID skinID = m_skinIDGenerator.AllocateID(); + uint32_t influenceBoneCount = pSkin->GetClusterCount(); + + cd::Skin skin; + skin.SetID(skinID); + skin.SetMeshID(sourceMesh.GetID()); + skin.SetName(pSkin->GetName()); + skin.SetVertexInfluenceBoneIDCount(influenceBoneCount); + skin.SetVertexBoneIndexCount(sourceMesh.GetVertexPositionCount()); + skin.SetVertexBoneWeightCount(sourceMesh.GetVertexPositionCount()); + for (int32_t skinClusterIndex = 0; skinClusterIndex < pSkin->GetClusterCount(); ++skinClusterIndex) + { + const fbxsdk::FbxCluster* pSkinCluster = pSkin->GetCluster(skinClusterIndex); + assert(pSkinCluster); + + const fbxsdk::FbxNode* pLinkBone = pSkinCluster->GetLink(); + assert(pLinkBone); + + const char* pBoneName = pLinkBone->GetName(); + + const int32_t controlPointIndicesCount = pSkinCluster->GetControlPointIndicesCount(); + int* pControlPointIndices = pSkinCluster->GetControlPointIndices(); + double* pBoneWeights = pSkinCluster->GetControlPointWeights(); + for (int32_t controlPointIndex = 0; controlPointIndex < controlPointIndicesCount; ++controlPointIndex) + { + uint32_t vertexIndex = pControlPointIndices[controlPointIndex]; + float boneWeight = static_cast(pBoneWeights[controlPointIndex]); + + + } + } + + pSceneDatabase->AddSkin(cd::MoveTemp(skin)); + + return skinID; +} + std::pair FbxProducerImpl::AllocateMaterialID(const fbxsdk::FbxSurfaceMaterial* pSDKMaterial) { uint32_t materialHash = cd::StringHash(pSDKMaterial->GetName()); diff --git a/private/Producers/FbxProducer/FbxProducerImpl.h b/private/Producers/FbxProducer/FbxProducerImpl.h index 16325e6..8c8ec7e 100644 --- a/private/Producers/FbxProducer/FbxProducerImpl.h +++ b/private/Producers/FbxProducer/FbxProducerImpl.h @@ -23,6 +23,7 @@ class FbxMesh; class FbxNode; class FbxProperty; class FbxScene; +class FbxSkin; class FbxSurfaceMaterial; } @@ -70,9 +71,10 @@ class FbxProducerImpl final void ParseMesh(cd::Mesh& mesh, fbxsdk::FbxNode* pSDKNode, fbxsdk::FbxMesh* pFbxMesh); - void ParseSkin(); cd::BlendShapeID ParseBlendShape(const fbxsdk::FbxBlendShape* pBlendShape, const cd::Mesh& sourceMesh, cd::SceneDatabase* pSceneDatabase); + cd::SkinID ParseSkin(const fbxsdk::FbxSkin* pSkin, const cd::Mesh& sourceMesh, cd::SceneDatabase* pSceneDatabase); + cd::BoneID ParseBone(const fbxsdk::FbxNode* pSDKNode, cd::BoneID parentBoneID, cd::SceneDatabase* pSceneDatabase); void ParseAnimation(fbxsdk::FbxScene* scene, cd::SceneDatabase* pSceneDatabase); diff --git a/private/ProgressiveMesh/ProgressiveMeshImpl.cpp b/private/ProgressiveMesh/ProgressiveMeshImpl.cpp index 9724719..5d5a2e6 100644 --- a/private/ProgressiveMesh/ProgressiveMeshImpl.cpp +++ b/private/ProgressiveMesh/ProgressiveMeshImpl.cpp @@ -478,15 +478,6 @@ cd::Mesh ProgressiveMeshImpl::GenerateLodMesh(uint32_t targetFaceCount, const cd mesh.SetVertexColor(setIndex, newVertexIndex, pSourceMesh->GetVertexColor(setIndex, vertexIndex)); } } - - if (vertexFormat.Contains(cd::VertexAttributeType::BoneIndex) && vertexFormat.Contains(cd::VertexAttributeType::BoneWeight)) - { - mesh.SetVertexInfluenceCount(pSourceMesh->GetVertexInfluenceCount()); - for (uint32_t boneIndex = 0U; boneIndex < mesh.GetVertexInfluenceCount(); ++boneIndex) - { - mesh.SetVertexBoneWeight(boneIndex, newVertexIndex, pSourceMesh->GetVertexBoneID(boneIndex, vertexIndex), pSourceMesh->GetVertexWeight(boneIndex, vertexIndex)); - } - } } } } diff --git a/private/Scene/Mesh.cpp b/private/Scene/Mesh.cpp index 5962f0c..2fa7b8c 100644 --- a/private/Scene/Mesh.cpp +++ b/private/Scene/Mesh.cpp @@ -142,57 +142,4 @@ const Color& Mesh::GetVertexColor(uint32_t setIndex, uint32_t vertexIndex) const return m_pMeshImpl->GetVertexColor(setIndex, vertexIndex); } -////////////////////////////////////////////////////////////////////////// -// Vertex animation data -////////////////////////////////////////////////////////////////////////// -void Mesh::SetVertexInfluenceCount(uint32_t influenceCount) -{ - m_pMeshImpl->SetVertexInfluenceCount(influenceCount); -} - -uint32_t Mesh::GetVertexInfluenceCount() const -{ - return m_pMeshImpl->GetVertexInfluenceCount(); -} - -void Mesh::SetVertexBoneWeight(uint32_t boneIndex, uint32_t vertexIndex, BoneID boneID, VertexWeight weight) -{ - m_pMeshImpl->SetVertexBoneWeight(boneIndex, vertexIndex, boneID, weight); -} - -std::vector& Mesh::GetVertexBoneIDs(uint32_t boneIndex) -{ - return m_pMeshImpl->GetVertexBoneIDs(boneIndex); -} - -const std::vector& Mesh::GetVertexBoneIDs(uint32_t boneIndex) const -{ - return m_pMeshImpl->GetVertexBoneIDs(boneIndex); -} - -BoneID Mesh::GetVertexBoneID(uint32_t boneIndex, uint32_t vertexIndex) const -{ - return m_pMeshImpl->GetVertexBoneID(boneIndex, vertexIndex); -} - -std::vector& Mesh::GetVertexWeights(uint32_t boneIndex) -{ - return m_pMeshImpl->GetVertexWeights(boneIndex); -} - -const std::vector& Mesh::GetVertexWeights(uint32_t boneIndex) const -{ - return m_pMeshImpl->GetVertexWeights(boneIndex); -} - -VertexWeight& Mesh::GetVertexWeight(uint32_t boneIndex, uint32_t vertexIndex) -{ - return m_pMeshImpl->GetVertexWeight(boneIndex, vertexIndex); -} - -const VertexWeight& Mesh::GetVertexWeight(uint32_t boneIndex, uint32_t vertexIndex) const -{ - return m_pMeshImpl->GetVertexWeight(boneIndex, vertexIndex); -} - } \ No newline at end of file diff --git a/private/Scene/MeshImpl.cpp b/private/Scene/MeshImpl.cpp index 2f9e67e..5002697 100644 --- a/private/Scene/MeshImpl.cpp +++ b/private/Scene/MeshImpl.cpp @@ -371,38 +371,4 @@ void MeshImpl::SetVertexColor(uint32_t setIndex, uint32_t vertexIndex, const Col m_vertexColorSets[setIndex][vertexIndex] = color; } -//////////////////////////////////////////////////////////////////////////////////// -// Vertex skin data -//////////////////////////////////////////////////////////////////////////////////// -void MeshImpl::SetVertexInfluenceCount(uint32_t influenceCount) -{ - assert(GetVertexCount() != 0U); - - m_vertexInfluenceCount = influenceCount; - for (uint32_t influenceIndex = 0U; influenceIndex < influenceCount; ++influenceIndex) - { - m_vertexBoneIDs[influenceIndex].resize(GetVertexCount()); - m_vertexWeights[influenceIndex].resize(GetVertexCount()); - } -} - -void MeshImpl::SetVertexBoneWeight(uint32_t boneIndex, uint32_t vertexIndex, BoneID boneID, VertexWeight weight) -{ - assert(vertexIndex < GetVertexCount()); - - if(m_vertexBoneIDs[boneIndex].empty() && - m_vertexWeights[boneIndex].empty()) - { - m_vertexBoneIDs[boneIndex].resize(GetVertexCount()); - m_vertexWeights[boneIndex].resize(GetVertexCount()); - - ++m_vertexInfluenceCount; - - assert(m_vertexInfluenceCount <= cd::MaxBoneInfluenceCount); - } - - m_vertexBoneIDs[boneIndex][vertexIndex] = boneID; - m_vertexWeights[boneIndex][vertexIndex] = weight; -} - } \ No newline at end of file diff --git a/private/Scene/MeshImpl.h b/private/Scene/MeshImpl.h index 4354419..4d23979 100644 --- a/private/Scene/MeshImpl.h +++ b/private/Scene/MeshImpl.h @@ -69,17 +69,6 @@ class MeshImpl final std::vector& GetVertexColors(uint32_t colorSetIndex) { return m_vertexColorSets[colorSetIndex]; } const std::vector& GetVertexColors(uint32_t colorSetIndex) const { return m_vertexColorSets[colorSetIndex]; } - void SetVertexInfluenceCount(uint32_t influenceCount); - uint32_t GetVertexInfluenceCount() const { return m_vertexInfluenceCount; } - void SetVertexBoneWeight(uint32_t boneIndex, uint32_t vertexIndex, BoneID boneID, VertexWeight weight); - BoneID GetVertexBoneID(uint32_t boneIndex, uint32_t vertexIndex) const { return m_vertexBoneIDs[boneIndex][vertexIndex]; } - std::vector& GetVertexBoneIDs(uint32_t boneIndex) { return m_vertexBoneIDs[boneIndex]; } - const std::vector& GetVertexBoneIDs(uint32_t boneIndex) const { return m_vertexBoneIDs[boneIndex]; } - VertexWeight& GetVertexWeight(uint32_t boneIndex, uint32_t vertexIndex) { return m_vertexWeights[boneIndex][vertexIndex]; } - const VertexWeight& GetVertexWeight(uint32_t boneIndex, uint32_t vertexIndex) const { return m_vertexWeights[boneIndex][vertexIndex]; } - std::vector& GetVertexWeights(uint32_t boneIndex) { return m_vertexWeights[boneIndex]; } - const std::vector& GetVertexWeights(uint32_t boneIndex) const { return m_vertexWeights[boneIndex]; } - template MeshImpl& operator<<(TInputArchive& inputArchive) { @@ -89,13 +78,11 @@ class MeshImpl final uint32_t vertexCount; uint32_t vertexUVSetCount; uint32_t vertexColorSetCount; - uint32_t vertexInfluenceCount; uint32_t polygonGroupCount; inputArchive >> GetName() >> GetID().Data() >> GetAABB() >> materialCount >> blendShapeCount >> skinCount - >> vertexCount >> GetVertexAttributeCount() - >> vertexUVSetCount >> vertexColorSetCount >> vertexInfluenceCount + >> vertexCount >> GetVertexAttributeCount() >> vertexUVSetCount >> vertexColorSetCount >> polygonGroupCount; GetVertexFormat() << inputArchive; @@ -128,13 +115,6 @@ class MeshImpl final inputArchive.ImportBuffer(GetVertexColors(colorSetIndex).data()); } - SetVertexInfluenceCount(vertexInfluenceCount); - for (uint32_t boneIndex = 0U; boneIndex < GetVertexInfluenceCount(); ++boneIndex) - { - inputArchive.ImportBuffer(GetVertexBoneIDs(boneIndex).data()); - inputArchive.ImportBuffer(GetVertexWeights(boneIndex).data()); - } - SetPolygonGroupCount(polygonGroupCount); for (uint32_t polygonGroupIndex = 0U; polygonGroupIndex < GetPolygonGroupCount(); ++polygonGroupIndex) { @@ -160,8 +140,7 @@ class MeshImpl final { outputArchive << GetName() << GetID().Data() << GetAABB() << GetMaterialIDCount() << GetBlendShapeIDCount() << GetSkinIDCount() - << GetVertexPositionCount() << GetVertexAttributeCount() - << GetVertexUVSetCount() << GetVertexColorSetCount() << GetVertexInfluenceCount() + << GetVertexPositionCount() << GetVertexAttributeCount() << GetVertexUVSetCount() << GetVertexColorSetCount() << GetPolygonGroupCount(); GetVertexFormat() >> outputArchive; @@ -184,12 +163,6 @@ class MeshImpl final outputArchive.ExportBuffer(GetVertexColors(colorSetIndex).data(), GetVertexColors(colorSetIndex).size()); } - for (uint32_t boneIndex = 0U; boneIndex < GetVertexInfluenceCount(); ++boneIndex) - { - outputArchive.ExportBuffer(GetVertexBoneIDs(boneIndex).data(), GetVertexBoneIDs(boneIndex).size()); - outputArchive.ExportBuffer(GetVertexWeights(boneIndex).data(), GetVertexWeights(boneIndex).size()); - } - for (uint32_t polygonGroupIndex = 0U; polygonGroupIndex < GetPolygonGroupCount(); ++polygonGroupIndex) { const auto& polygonGroup = GetPolygonGroup(polygonGroupIndex); @@ -208,15 +181,10 @@ class MeshImpl final private: uint32_t m_vertexUVSetCount = 0U; uint32_t m_vertexColorSetCount = 0U; - uint32_t m_vertexInfluenceCount = 0U; // vertex texture data std::vector m_vertexUVSets[MaxUVSetCount]; std::vector m_vertexColorSets[MaxColorSetCount]; - - // vertex skin data - std::vector m_vertexBoneIDs[MaxBoneInfluenceCount]; - std::vector m_vertexWeights[MaxBoneInfluenceCount]; }; } \ No newline at end of file diff --git a/private/Scene/SceneDatabaseImpl.h b/private/Scene/SceneDatabaseImpl.h index 0d182a1..77e13ba 100644 --- a/private/Scene/SceneDatabaseImpl.h +++ b/private/Scene/SceneDatabaseImpl.h @@ -12,8 +12,8 @@ #include "Scene/Mesh.h" #include "Scene/Morph.h" #include "Scene/Node.h" -#include "Scene/Skin.h" #include "Scene/Skeleton.h" +#include "Scene/Skin.h" #include "Scene/Texture.h" #include "Scene/Track.h" #include "Scene/ParticleEmitter.h" diff --git a/private/Scene/Skin.cpp b/private/Scene/Skin.cpp index 30d2fe5..74f6704 100644 --- a/private/Scene/Skin.cpp +++ b/private/Scene/Skin.cpp @@ -6,6 +6,7 @@ namespace cd PIMPL_SCENE_CLASS(Skin); PIMPL_SIMPLE_TYPE_APIS(Skin, ID); +PIMPL_SIMPLE_TYPE_APIS(Skin, MeshID); PIMPL_SIMPLE_TYPE_APIS(Skin, SkeletonID); PIMPL_STRING_TYPE_APIS(Skin, Name); PIMPL_VECTOR_TYPE_APIS(Skin, VertexInfluenceBoneID); diff --git a/private/Scene/SkinImpl.h b/private/Scene/SkinImpl.h index 4344e4e..d96b96c 100644 --- a/private/Scene/SkinImpl.h +++ b/private/Scene/SkinImpl.h @@ -14,6 +14,7 @@ class SkinImpl final DECLARE_SCENE_IMPL_CLASS(Skin); IMPLEMENT_SIMPLE_TYPE_APIS(Skin, ID); + IMPLEMENT_SIMPLE_TYPE_APIS(Skin, MeshID); IMPLEMENT_SIMPLE_TYPE_APIS(Skin, SkeletonID); IMPLEMENT_STRING_TYPE_APIS(Skin, Name); IMPLEMENT_VECTOR_TYPE_APIS(Skin, VertexInfluenceBoneID); diff --git a/public/Scene/APITypeTraits.inl b/public/Scene/APITypeTraits.inl index 4daac73..e5fe24b 100644 --- a/public/Scene/APITypeTraits.inl +++ b/public/Scene/APITypeTraits.inl @@ -236,14 +236,15 @@ struct SkinTypeTraits { // Simple using ID = cd::SkinID; + using MeshID = cd::MeshID; using SkeletonID = cd::SkeletonID; // String using Name = std::string; // Vector - using VertexInfluenceBoneID = uint8_t; - using VertexBoneIndex = uint8_t; + using VertexInfluenceBoneID = cd::BoneID; + using VertexBoneIndex = uint16_t; using VertexBoneWeight = float; }; diff --git a/public/Scene/Mesh.h b/public/Scene/Mesh.h index 7190f70..49d36c4 100644 --- a/public/Scene/Mesh.h +++ b/public/Scene/Mesh.h @@ -64,17 +64,6 @@ class CORE_API Mesh final const std::vector& GetVertexColor(uint32_t colorSetIndex) const; Color& GetVertexColor(uint32_t setIndex, uint32_t vertexIndex); const Color& GetVertexColor(uint32_t setIndex, uint32_t vertexIndex) const; - - void SetVertexInfluenceCount(uint32_t influenceCount); - uint32_t GetVertexInfluenceCount() const; - void SetVertexBoneWeight(uint32_t boneIndex, uint32_t vertexIndex, BoneID boneID, VertexWeight weight); - std::vector& GetVertexBoneIDs(uint32_t boneIndex); - const std::vector& GetVertexBoneIDs(uint32_t boneIndex) const; - BoneID GetVertexBoneID(uint32_t boneIndex, uint32_t vertexIndex) const; - std::vector& GetVertexWeights(uint32_t boneIndex); - const std::vector& GetVertexWeights(uint32_t boneIndex) const; - VertexWeight& GetVertexWeight(uint32_t boneIndex, uint32_t vertexIndex); - const VertexWeight& GetVertexWeight(uint32_t boneIndex, uint32_t vertexIndex) const; }; } \ No newline at end of file diff --git a/public/Scene/SceneDatabase.h b/public/Scene/SceneDatabase.h index f8574f8..8514b55 100644 --- a/public/Scene/SceneDatabase.h +++ b/public/Scene/SceneDatabase.h @@ -16,6 +16,7 @@ #include "Scene/Node.h" #include "Scene/ParticleEmitter.h" #include "Scene/Skeleton.h" +#include "Scene/Skin.h" #include "Scene/Texture.h" #include "Scene/Track.h" diff --git a/public/Scene/Skin.h b/public/Scene/Skin.h index bd833ab..d039427 100644 --- a/public/Scene/Skin.h +++ b/public/Scene/Skin.h @@ -15,6 +15,7 @@ class CORE_API Skin final public: DECLARE_SCENE_CLASS(Skin); EXPORT_SIMPLE_TYPE_APIS(Skin, ID); + EXPORT_SIMPLE_TYPE_APIS(Skin, MeshID); EXPORT_SIMPLE_TYPE_APIS(Skin, SkeletonID); EXPORT_STRING_TYPE_APIS(Skin, Name); EXPORT_VECTOR_TYPE_APIS(Skin, VertexInfluenceBoneID);