From 1844a897c42507fbeaace8b01f08f670495ef822 Mon Sep 17 00:00:00 2001 From: Jeremy Hu Date: Fri, 17 Jan 2020 19:45:58 +0930 Subject: [PATCH] Add more poly count options for remesh --- languages/dust3d_zh_CN.ts | 20 ++++++++++++++------ src/meshgenerator.cpp | 2 +- src/polycount.h | 34 ++++++++++++++++++++++++++-------- 3 files changed, 41 insertions(+), 15 deletions(-) diff --git a/languages/dust3d_zh_CN.ts b/languages/dust3d_zh_CN.ts index 13619237..24b22e63 100644 --- a/languages/dust3d_zh_CN.ts +++ b/languages/dust3d_zh_CN.ts @@ -1076,7 +1076,7 @@ Tips: Low Poly - 低面 + 低面数 Original @@ -1084,11 +1084,7 @@ Tips: High Poly - 高面 - - - Extreme High Poly - 极高面 + 高面数 Body @@ -1106,6 +1102,18 @@ Tips: Centripetal 向心力 + + Extremely High Poly + 极高面数 + + + Ultra High Poly + 超高面数 + + + Tremendously High Poly + 巨多面数 + RigWidget diff --git a/src/meshgenerator.cpp b/src/meshgenerator.cpp index 03f6821d..827c2911 100644 --- a/src/meshgenerator.cpp +++ b/src/meshgenerator.cpp @@ -875,7 +875,7 @@ bool MeshGenerator::componentRemeshed(const std::map *componen return false; if (ComponentLayer::Cloth == ComponentLayerFromString(valueOfKeyInMapOrEmpty(*component, "layer").toUtf8().constData())) { if (nullptr != polyCountValue) - *polyCountValue = PolyCountToValue(PolyCount::ExtremeHighPoly); + *polyCountValue = PolyCountToValue(PolyCount::UltraHighPoly); return true; } auto polyCount = PolyCountFromString(valueOfKeyInMapOrEmpty(*component, "polyCount").toUtf8().constData()); diff --git a/src/polycount.h b/src/polycount.h index a667932b..950786b4 100644 --- a/src/polycount.h +++ b/src/polycount.h @@ -7,7 +7,9 @@ enum class PolyCount LowPoly, Original, HighPoly, - ExtremeHighPoly, + UltraHighPoly, + ExtremelyHighPoly, + TremendouslyHighPoly, Count }; PolyCount PolyCountFromString(const char *countString); @@ -21,8 +23,12 @@ PolyCount PolyCountFromString(const char *countString) \ return PolyCount::Original; \ if (count == "HighPoly") \ return PolyCount::HighPoly; \ - if (count == "ExtremeHighPoly") \ - return PolyCount::ExtremeHighPoly; \ + if (count == "UltraHighPoly") \ + return PolyCount::UltraHighPoly; \ + if (count == "ExtremelyHighPoly") \ + return PolyCount::ExtremelyHighPoly; \ + if (count == "TremendouslyHighPoly") \ + return PolyCount::TremendouslyHighPoly; \ return PolyCount::Original; \ } const char *PolyCountToString(PolyCount count); @@ -36,8 +42,12 @@ const char *PolyCountToString(PolyCount count) \ return "Original"; \ case PolyCount::HighPoly: \ return "HighPoly"; \ - case PolyCount::ExtremeHighPoly: \ - return "ExtremeHighPoly"; \ + case PolyCount::UltraHighPoly: \ + return "UltraHighPoly"; \ + case PolyCount::ExtremelyHighPoly: \ + return "ExtremelyHighPoly"; \ + case PolyCount::TremendouslyHighPoly: \ + return "TremendouslyHighPoly"; \ default: \ return "Original"; \ } \ @@ -53,8 +63,12 @@ QString PolyCountToDispName(PolyCount count) \ return QObject::tr("Original"); \ case PolyCount::HighPoly: \ return QObject::tr("High Poly"); \ - case PolyCount::ExtremeHighPoly: \ - return QObject::tr("Extreme High Poly"); \ + case PolyCount::UltraHighPoly: \ + return QObject::tr("Ultra High Poly"); \ + case PolyCount::ExtremelyHighPoly: \ + return QObject::tr("Extremely High Poly"); \ + case PolyCount::TremendouslyHighPoly: \ + return QObject::tr("Tremendously High Poly"); \ default: \ return QObject::tr("Original"); \ } \ @@ -70,8 +84,12 @@ float PolyCountToValue(PolyCount count) \ return 1.0f; \ case PolyCount::HighPoly: \ return 1.2f; \ - case PolyCount::ExtremeHighPoly: \ + case PolyCount::UltraHighPoly: \ return 1.8f; \ + case PolyCount::ExtremelyHighPoly: \ + return 2.4f; \ + case PolyCount::TremendouslyHighPoly: \ + return 3.0f; \ default: \ return 1.0f; \ } \