diff --git a/install/ui/materialeditor.fbp b/install/ui/materialeditor.fbp index ff7386536f..1f1c615502 100644 --- a/install/ui/materialeditor.fbp +++ b/install/ui/materialeditor.fbp @@ -7942,7 +7942,7 @@ 0 1 - MaterialHasRenderbump + MaterialHasRenderBump 1 @@ -8070,7 +8070,7 @@ 0 1 - m_checkBox61111 + MaterialHasRenderBumpFlat 1 @@ -8133,7 +8133,7 @@ 0 1 - m_textCtrl5111 + MaterialRenderBumpFlatArguments 1 diff --git a/install/ui/materialeditor.xrc b/install/ui/materialeditor.xrc index ea727cf097..d75aa8e58f 100644 --- a/install/ui/materialeditor.xrc +++ b/install/ui/materialeditor.xrc @@ -1327,7 +1327,7 @@ wxALIGN_CENTER_VERTICAL 0 - + 0 @@ -1344,7 +1344,7 @@ wxALIGN_CENTER_VERTICAL|wxALL 0 - + 0 @@ -1353,7 +1353,7 @@ wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND 0 - + diff --git a/radiant/ui/materials/MaterialEditor.cpp b/radiant/ui/materials/MaterialEditor.cpp index bda536e6bd..dd1147e7c1 100644 --- a/radiant/ui/materials/MaterialEditor.cpp +++ b/radiant/ui/materials/MaterialEditor.cpp @@ -401,19 +401,26 @@ void MaterialEditor::updateMaterialPropertiesFromMaterial() getControl("MaterialDecalInfoEndRgb")->SetValue(fmt::format("({0} {1} {2} {3})", decalInfo.endColour.x(), decalInfo.endColour.y(), decalInfo.endColour.z(), decalInfo.endColour.w())); - getControl("MaterialHasRenderbump")->SetValue(!_material->getRenderBumpArguments().empty()); + getControl("MaterialHasRenderBump")->SetValue(!_material->getRenderBumpArguments().empty()); getControl("MaterialRenderBumpArguments")->Enable(!_material->getRenderBumpArguments().empty()); getControl("MaterialRenderBumpArguments")->SetValue(_material->getRenderBumpArguments()); + getControl("MaterialHasRenderBumpFlat")->SetValue(!_material->getRenderBumpFlatArguments().empty()); + getControl("MaterialRenderBumpFlatArguments")->Enable(!_material->getRenderBumpFlatArguments().empty()); + getControl("MaterialRenderBumpFlatArguments")->SetValue(_material->getRenderBumpFlatArguments()); + // Surround the definition with curly braces, these are not included auto definition = fmt::format("{0}\n{{{1}}}", _material->getName(), _material->getDefinition()); _sourceView->SetValue(definition); } else { - getControl("MaterialHasRenderbump")->SetValue(false); + getControl("MaterialHasRenderBump")->SetValue(false); getControl("MaterialRenderBumpArguments")->SetValue(""); + getControl("MaterialHasRenderBumpFlat")->SetValue(false); + getControl("MaterialRenderBumpFlatArguments")->SetValue(""); + getControl("MaterialHasDecalInfo")->SetValue(false); getControl("MaterialEditorDecalInfoStaySeconds")->SetValue(0); getControl("MaterialEditorDecalInfoFadeSeconds")->SetValue(0);