Merge branch 'MiscQOLFixes20210828' of https://github.com/Areloch/Torque3D into Preview4_0

This commit is contained in:
Areloch 2021-09-01 17:44:43 -05:00
commit 25a32cba2a
26 changed files with 330 additions and 204 deletions

View file

@ -159,7 +159,7 @@ function EPainter::updateLayers( %this, %matIndex )
%ctrl = new GuiIconButtonCtrl()
{
profile = "GuiCreatorIconButtonProfile";
iconBitmap = "~/worldEditor/images/terrainpainter/new_layer_icon";
iconBitmapAsset = "ToolsModule:new_layer_icon_image";
iconLocation = "Left";
textLocation = "Right";
extent = %listWidth SPC "46";

View file

@ -246,14 +246,22 @@ function TerrainMaterialDlg::clearTextureMap(%this, %mapName)
%targetMap.setBitmap($TerrainMaterialEditor::emptyMaterialImage);
%targetMap.asset = "";
%targetMapName = %this.findObjectByInternalName(%mapName @ "AssetId", true);
%targetMapName.setText("None");
TerrainMaterialDlg.matDirty = true;
if(%mapName $= "DetailMap")
{
//hide the supplemental maps
NormalMapContainer.callOnChildren("setActive", false);
%this.clearTextureMap("NormalMap");
ORMMapContainer.callOnChildren("setActive", false);
%this.clearTextureMap("ORMMap");
MacroMapContainer.callOnChildren("setActive", false);
%this.clearTextureMap("MacroMap");
}
}
@ -290,6 +298,9 @@ function TerrainMaterialDlg::changeTerrainMatMapAsset(%this)
%targetMap.setBitmap( %image );
%targetMapName = %mapName @ "AssetId";
%targetMapName.setText(%imgAsset);
TerrainMaterialDlg.matDirty = true;
}
@ -546,29 +557,32 @@ function TerrainMaterialDlg::saveDirtyMaterial( %this, %mat )
%newName = %this-->matNameCtrl.getText();
%blankBitmap = AssetDatabase.acquireAsset($TerrainMaterialEditor::emptyMaterialImage).getImagePath();
//---
%newDiffuse = %this-->texBaseMap.getBitmap();
if(%newDiffuse $= $TerrainMaterialEditor::emptyMaterialImage)
if(%newDiffuse $= $TerrainMaterialEditor::emptyMaterialImage || %newDiffuse $= %blankBitmap)
%newDiffuse = "";
//---
%newNormal = %this-->texNormalMap.getBitmap();
if(%newNormal $= $TerrainMaterialEditor::emptyMaterialImage)
if(%newNormal $= $TerrainMaterialEditor::emptyMaterialImage || %newNormal $= %blankBitmap)
%newNormal = "";
//---
%newormConfig = %this-->texORMConfigMap.getBitmap();
if(%newormConfig $= $TerrainMaterialEditor::emptyMaterialImage)
if(%newormConfig $= $TerrainMaterialEditor::emptyMaterialImage || %newormConfig $= %blankBitmap)
%newormConfig = "";
//---
%newDetail = %this-->texDetailMap.getBitmap();
if(%newDetail $= $TerrainMaterialEditor::emptyMaterialImage)
if(%newDetail $= $TerrainMaterialEditor::emptyMaterialImage || %newDetail $= %blankBitmap)
%newDetail = "";
//---
%newMacro = %this-->texMacroMap.getBitmap();
if(%newMacro $= $TerrainMaterialEditor::emptyMaterialImage)
if(%newMacro $= $TerrainMaterialEditor::emptyMaterialImage || %newMacro $= %blankBitmap)
%newMacro = "";
%detailSize = %this-->detSizeCtrl.getText();

View file

@ -1059,7 +1059,12 @@ function EditorDropTypeMenu::onSelectItem(%this, %id, %text)
// a drop type is selected in the menu.
EWorldEditor.dropType = getField(%this.item[%id], 2);
%this.checkRadioItem(0, (%this.getItemCount() - 1), %id);
for(%i=0; %i < %this.getItemCount() + 1; %i++)
{
%this.checkItem(%i, false);
}
%this.checkItem(%id, true);
return true;
}