Skip to content

Commit

Permalink
#5567: Make sure editor image expression is carried over when cloning…
Browse files Browse the repository at this point in the history
… templates
  • Loading branch information
codereader committed Apr 2, 2021
1 parent 0c88787 commit c29cb37
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions radiant/ui/materials/editor/MaterialEditor.cpp
Expand Up @@ -368,6 +368,7 @@ void MaterialEditor::setupBasicMaterialPage()

_material->setEditorImageExpressionFromString(editorImageEntry->GetValue().ToStdString());
updateStageBlendControls();
updateBasicImagePreview();
onMaterialChanged();
});

Expand Down
2 changes: 2 additions & 0 deletions radiantcore/shaders/ShaderTemplate.cpp
Expand Up @@ -56,6 +56,8 @@ ShaderTemplate::ShaderTemplate(const ShaderTemplate& other) :
_parseFlags(other._parseFlags),
_guiDeclName(other._guiDeclName)
{
_editorTex = other._editorTex ? MapExpression::createForString(other._editorTex->getExpressionString()) : MapExpressionPtr();

_ambientRimColour[0] = other._ambientRimColour[0];
_ambientRimColour[1] = other._ambientRimColour[1];
_ambientRimColour[2] = other._ambientRimColour[2];
Expand Down

0 comments on commit c29cb37

Please sign in to comment.