1
Fork 0
mirror of https://github.com/redstrate/Novus.git synced 2025-04-22 12:07:45 +00:00

Decode material parameter names

This commit is contained in:
Joshua Goins 2024-04-27 18:17:37 -04:00
parent a8d64a52df
commit c1b45611a2
2 changed files with 22 additions and 2 deletions

View file

@ -318,4 +318,19 @@ const QHash<uint, const char *> keys = {
{0xC8BD1DEF, "Specular Map Mode"},
{0x198D11CD, "Color"},
{0xA02F4828, "Multi"}};
{0xA02F4828, "Multi"},
{physis_shpk_crc("g_DiffuseColor"), "g_DiffuseColor"},
{physis_shpk_crc("g_AlphaThreshold"), "g_AlphaThreshold"},
{physis_shpk_crc("g_FresnelValue0"), "g_FresnelValue0"},
{physis_shpk_crc("g_SpecularMask"), "g_SpecularMask"},
{physis_shpk_crc("g_LipFresnelValue0"), "g_LipFresnelValue0"},
{physis_shpk_crc("g_Shininess"), "g_Shininess"},
{physis_shpk_crc("g_EmissiveColor"), "g_EmissiveColor"},
{physis_shpk_crc("g_LipShininess"), "g_LipShininess"},
{physis_shpk_crc("g_TileScale"), "g_TileScale"},
{physis_shpk_crc("g_AmbientOcclusionMask"), "g_AmbientOcclusionMask"},
{physis_shpk_crc("g_TileIndex"), "g_TileIndex"},
{physis_shpk_crc("g_AmbientOcclusionMask"), "g_AmbientOcclusionMask"},
{physis_shpk_crc("g_ScatteringLevel"), "g_ScatteringLevel"},
{physis_shpk_crc("g_NormalScale"), "g_NormalScale"}};

View file

@ -210,7 +210,12 @@ void MtrlPart::rebuild()
for (int i = 0; i < m_material.num_constants; i++) {
const auto constant = m_material.constants[i];
auto groupBox = new QGroupBox(QString::number(constant.id));
QString name = i18n("Unknown %1", QString::number(constant.id));
if (keys.contains(constant.id)) {
name = QString::fromLatin1(keys[constant.id]);
}
auto groupBox = new QGroupBox(name);
m_constantsLayout->addWidget(groupBox);
auto layout = new QFormLayout();