From fadafbfa1b85d59a64da70ef3069cde3a0b1a575 Mon Sep 17 00:00:00 2001 From: AzaezelX Date: Sun, 11 Apr 2021 19:57:31 -0500 Subject: [PATCH 1/2] form steve yorkshire: mat editor save extension fix --- .../tools/materialEditor/scripts/materialEditor.ed.tscript | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.tscript b/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.tscript index bcb2b2c29..cf4ac6e40 100644 --- a/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.tscript +++ b/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.tscript @@ -2551,7 +2551,7 @@ function MaterialEditorGui::saveCompositeMap(%this) %saveAs = ""; %dlg = new SaveFileDialog() { - Filters = "png"; + Filters = "PNG File (*.png)|*.png|"; DefaultPath = EditorSettings.value("data/"); ChangePath = false; OverwritePrompt = true; @@ -2565,6 +2565,9 @@ function MaterialEditorGui::saveCompositeMap(%this) %saveAs = %dlg.FileName; } + if( fileExt( %saveAs ) !$= ".png" ) + %saveAs = %saveAs @ ".png"; + %material = %this.currentMaterial; %layer = %this.currentLayer; From 0289090c3496b65c6142ab9955db99f29740d1aa Mon Sep 17 00:00:00 2001 From: AzaezelX Date: Thu, 22 Apr 2021 20:02:21 -0500 Subject: [PATCH 2/2] minor cleanup --- .../game/tools/materialEditor/scripts/materialEditor.ed.tscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.tscript b/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.tscript index cf4ac6e40..f0d99d579 100644 --- a/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.tscript +++ b/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.tscript @@ -2551,7 +2551,7 @@ function MaterialEditorGui::saveCompositeMap(%this) %saveAs = ""; %dlg = new SaveFileDialog() { - Filters = "PNG File (*.png)|*.png|"; + Filters = "PNG File (*.png)|*.png"; DefaultPath = EditorSettings.value("data/"); ChangePath = false; OverwritePrompt = true;