Add more poly count options for remesh

master
Jeremy Hu 2020-01-17 19:45:58 +09:30
parent 8775a09fa3
commit 1844a897c4
3 changed files with 41 additions and 15 deletions

View File

@ -1076,7 +1076,7 @@ Tips:
</message> </message>
<message> <message>
<source>Low Poly</source> <source>Low Poly</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<source>Original</source> <source>Original</source>
@ -1084,11 +1084,7 @@ Tips:
</message> </message>
<message> <message>
<source>High Poly</source> <source>High Poly</source>
<translation></translation> <translation></translation>
</message>
<message>
<source>Extreme High Poly</source>
<translation></translation>
</message> </message>
<message> <message>
<source>Body</source> <source>Body</source>
@ -1106,6 +1102,18 @@ Tips:
<source>Centripetal</source> <source>Centripetal</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<source>Extremely High Poly</source>
<translation></translation>
</message>
<message>
<source>Ultra High Poly</source>
<translation></translation>
</message>
<message>
<source>Tremendously High Poly</source>
<translation></translation>
</message>
</context> </context>
<context> <context>
<name>RigWidget</name> <name>RigWidget</name>

View File

@ -875,7 +875,7 @@ bool MeshGenerator::componentRemeshed(const std::map<QString, QString> *componen
return false; return false;
if (ComponentLayer::Cloth == ComponentLayerFromString(valueOfKeyInMapOrEmpty(*component, "layer").toUtf8().constData())) { if (ComponentLayer::Cloth == ComponentLayerFromString(valueOfKeyInMapOrEmpty(*component, "layer").toUtf8().constData())) {
if (nullptr != polyCountValue) if (nullptr != polyCountValue)
*polyCountValue = PolyCountToValue(PolyCount::ExtremeHighPoly); *polyCountValue = PolyCountToValue(PolyCount::UltraHighPoly);
return true; return true;
} }
auto polyCount = PolyCountFromString(valueOfKeyInMapOrEmpty(*component, "polyCount").toUtf8().constData()); auto polyCount = PolyCountFromString(valueOfKeyInMapOrEmpty(*component, "polyCount").toUtf8().constData());

View File

@ -7,7 +7,9 @@ enum class PolyCount
LowPoly, LowPoly,
Original, Original,
HighPoly, HighPoly,
ExtremeHighPoly, UltraHighPoly,
ExtremelyHighPoly,
TremendouslyHighPoly,
Count Count
}; };
PolyCount PolyCountFromString(const char *countString); PolyCount PolyCountFromString(const char *countString);
@ -21,8 +23,12 @@ PolyCount PolyCountFromString(const char *countString) \
return PolyCount::Original; \ return PolyCount::Original; \
if (count == "HighPoly") \ if (count == "HighPoly") \
return PolyCount::HighPoly; \ return PolyCount::HighPoly; \
if (count == "ExtremeHighPoly") \ if (count == "UltraHighPoly") \
return PolyCount::ExtremeHighPoly; \ return PolyCount::UltraHighPoly; \
if (count == "ExtremelyHighPoly") \
return PolyCount::ExtremelyHighPoly; \
if (count == "TremendouslyHighPoly") \
return PolyCount::TremendouslyHighPoly; \
return PolyCount::Original; \ return PolyCount::Original; \
} }
const char *PolyCountToString(PolyCount count); const char *PolyCountToString(PolyCount count);
@ -36,8 +42,12 @@ const char *PolyCountToString(PolyCount count) \
return "Original"; \ return "Original"; \
case PolyCount::HighPoly: \ case PolyCount::HighPoly: \
return "HighPoly"; \ return "HighPoly"; \
case PolyCount::ExtremeHighPoly: \ case PolyCount::UltraHighPoly: \
return "ExtremeHighPoly"; \ return "UltraHighPoly"; \
case PolyCount::ExtremelyHighPoly: \
return "ExtremelyHighPoly"; \
case PolyCount::TremendouslyHighPoly: \
return "TremendouslyHighPoly"; \
default: \ default: \
return "Original"; \ return "Original"; \
} \ } \
@ -53,8 +63,12 @@ QString PolyCountToDispName(PolyCount count) \
return QObject::tr("Original"); \ return QObject::tr("Original"); \
case PolyCount::HighPoly: \ case PolyCount::HighPoly: \
return QObject::tr("High Poly"); \ return QObject::tr("High Poly"); \
case PolyCount::ExtremeHighPoly: \ case PolyCount::UltraHighPoly: \
return QObject::tr("Extreme High Poly"); \ 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: \ default: \
return QObject::tr("Original"); \ return QObject::tr("Original"); \
} \ } \
@ -70,8 +84,12 @@ float PolyCountToValue(PolyCount count) \
return 1.0f; \ return 1.0f; \
case PolyCount::HighPoly: \ case PolyCount::HighPoly: \
return 1.2f; \ return 1.2f; \
case PolyCount::ExtremeHighPoly: \ case PolyCount::UltraHighPoly: \
return 1.8f; \ return 1.8f; \
case PolyCount::ExtremelyHighPoly: \
return 2.4f; \
case PolyCount::TremendouslyHighPoly: \
return 3.0f; \
default: \ default: \
return 1.0f; \ return 1.0f; \
} \ } \