From 24e8af235220131c8ccb6e26c0d0aaabd67abfd9 Mon Sep 17 00:00:00 2001 From: huxingyi Date: Sat, 11 Apr 2020 22:06:19 +0930 Subject: [PATCH] Change default part base as PartBase::Average --- src/meshgenerator.cpp | 12 +++++++----- src/skeletondocument.h | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/meshgenerator.cpp b/src/meshgenerator.cpp index 79863bb2..3200ee90 100644 --- a/src/meshgenerator.cpp +++ b/src/meshgenerator.cpp @@ -1711,10 +1711,14 @@ void MeshGenerator::remesh(const std::vector &inputNodes, void MeshGenerator::collectIncombinableComponentMeshes(const QString &componentIdString) { - const auto &componentCache = m_cacheContext->components[componentIdString]; - for (const auto &mesh: componentCache.incombinableMeshes) - collectIncombinableMesh(mesh, componentCache); const auto &component = findComponent(componentIdString); + if (CombineMode::Uncombined == componentCombineMode(component)) + return; + const auto &componentCache = m_cacheContext->components[componentIdString]; + for (const auto &mesh: componentCache.incombinableMeshes) { + m_isSuccessful = false; + collectIncombinableMesh(mesh, componentCache); + } for (const auto &childIdString: valueOfKeyInMapOrEmpty(*component, "children").split(",")) { if (childIdString.isEmpty()) continue; @@ -1726,8 +1730,6 @@ void MeshGenerator::collectIncombinableMesh(const MeshCombiner::Mesh *mesh, cons { if (nullptr == mesh) return; - - m_isSuccessful = false; std::vector uncombinedVertices; std::vector> uncombinedFaces; diff --git a/src/skeletondocument.h b/src/skeletondocument.h index 7452ec84..209b8316 100644 --- a/src/skeletondocument.h +++ b/src/skeletondocument.h @@ -190,7 +190,7 @@ public: disabled(false), xMirrored(false), zMirrored(false), - base(PartBase::XYZ), + base(PartBase::Average), deformThickness(1.0), deformWidth(1.0), rounded(false),