Merge pull request #484 from Azaezel/alpha40/matEditorSaveFix

form steve yorkshire: mat editor save extension fix
This commit is contained in:
Brian Roberts 2021-04-22 20:02:29 -05:00 committed by GitHub
commit 793c4c3701
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;