mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
Merge pull request #323 from Azaezel/alpha40_smoothToRough_clean
shift pbrconfig to ORM in keeping with the prepoderance of industry standards
This commit is contained in:
commit
681dbe108c
55 changed files with 970 additions and 767 deletions
|
|
@ -767,12 +767,12 @@
|
|||
tooltipProfile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "pbrConfigTexCtrl";
|
||||
internalName = "ormConfigTexCtrl";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
text = "PBR Config";
|
||||
text = "ORM Config";
|
||||
maxLength = "1024";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
|
|
@ -812,9 +812,9 @@
|
|||
profile = "ToolsGuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "TerrainMaterialDlg.changePBRConfig();";
|
||||
command = "TerrainMaterialDlg.changeormConfig();";
|
||||
tooltipProfile = "ToolsGuiDefaultProfile";
|
||||
tooltip = "Change the active PBR Config Map for this layer.";
|
||||
tooltip = "Change the active ORM Config Map for this layer.";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
|
|
@ -856,7 +856,7 @@
|
|||
profile = "ToolsGuiButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "TerrainMaterialDlg.changePBRConfig();";
|
||||
command = "TerrainMaterialDlg.changeormConfig();";
|
||||
tooltipProfile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
|
|
@ -881,7 +881,7 @@
|
|||
profile = "ToolsGuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "TerrainMaterialDlg-->pbrConfigTexCtrl.setBitmap(\"tools/materialEditor/gui/unknownImage\");";
|
||||
command = "TerrainMaterialDlg-->ormConfigTexCtrl.setBitmap(\"tools/materialEditor/gui/unknownImage\");";
|
||||
tooltipProfile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
|
|
@ -909,7 +909,7 @@
|
|||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiCheckBoxCtrl() {
|
||||
text = " Invert Smoothness";
|
||||
text = " Invert Roughness";
|
||||
groupNum = "-1";
|
||||
buttonType = "ToggleButton";
|
||||
useMouseEvents = "0";
|
||||
|
|
@ -924,7 +924,7 @@
|
|||
tooltipProfile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "invertSmoothness";
|
||||
internalName = "invertRoughness";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -307,9 +307,9 @@ function TerrainMaterialDlg::changeNormal( %this )
|
|||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
function TerrainMaterialDlg::changePBRConfig( %this )
|
||||
function TerrainMaterialDlg::changeormConfig( %this )
|
||||
{
|
||||
%ctrl = %this-->pbrConfigTexCtrl;
|
||||
%ctrl = %this-->ormConfigTexCtrl;
|
||||
%file = %ctrl.bitmap;
|
||||
if( getSubStr( %file, 0 , 6 ) $= "tools/" )
|
||||
%file = "";
|
||||
|
|
@ -417,10 +417,10 @@ function TerrainMaterialDlg::setActiveMaterial( %this, %mat )
|
|||
}else{
|
||||
%this-->baseTexCtrl.setBitmap( %mat.diffuseMap );
|
||||
}
|
||||
if (%mat.pbrConfigMap $= ""){
|
||||
%this-->pbrConfigTexCtrl.setBitmap( "tools/materialEditor/gui/unknownImage" );
|
||||
if (%mat.ormConfigMap $= ""){
|
||||
%this-->ormConfigTexCtrl.setBitmap( "tools/materialEditor/gui/unknownImage" );
|
||||
}else{
|
||||
%this-->pbrConfigTexCtrl.setBitmap( %mat.pbrConfigMap );
|
||||
%this-->ormConfigTexCtrl.setBitmap( %mat.ormConfigMap );
|
||||
}
|
||||
if (%mat.detailMap $= ""){
|
||||
%this-->detailTexCtrl.setBitmap( "tools/materialEditor/gui/unknownImage" );
|
||||
|
|
@ -449,7 +449,7 @@ function TerrainMaterialDlg::setActiveMaterial( %this, %mat )
|
|||
%this-->macroDistanceCtrl.setText( %mat.macroDistance );
|
||||
|
||||
%this-->isSRGB.setValue( %mat.isSRGB );
|
||||
%this-->invertSmoothness.setValue( %mat.invertSmoothness );
|
||||
%this-->invertRoughness.setValue( %mat.invertRoughness );
|
||||
|
||||
%this.activateMaterialCtrls( true );
|
||||
}
|
||||
|
|
@ -483,10 +483,10 @@ function TerrainMaterialDlg::saveDirtyMaterial( %this, %mat )
|
|||
}else{
|
||||
%newNormal = %this-->normTexCtrl.bitmap;
|
||||
}
|
||||
if (%this-->pbrConfigTexCtrl.bitmap $= "tools/materialEditor/gui/unknownImage"){
|
||||
%newPBRConfig = "";
|
||||
if (%this-->ormConfigTexCtrl.bitmap $= "tools/materialEditor/gui/unknownImage"){
|
||||
%newormConfig = "";
|
||||
}else{
|
||||
%newPBRConfig = %this-->pbrConfigTexCtrl.bitmap;
|
||||
%newormConfig = %this-->ormConfigTexCtrl.bitmap;
|
||||
}
|
||||
if (%this-->detailTexCtrl.bitmap $= "tools/materialEditor/gui/unknownImage"){
|
||||
%newDetail = "";
|
||||
|
|
@ -510,7 +510,7 @@ function TerrainMaterialDlg::saveDirtyMaterial( %this, %mat )
|
|||
%macroDistance = %this-->macroDistanceCtrl.getText();
|
||||
|
||||
%isSRGB = %this-->isSRGB.getValue();
|
||||
%invertSmoothness = %this-->invertSmoothness.getValue();
|
||||
%invertRoughness = %this-->invertRoughness.getValue();
|
||||
|
||||
// If no properties of this materials have changed,
|
||||
// return.
|
||||
|
|
@ -519,7 +519,7 @@ function TerrainMaterialDlg::saveDirtyMaterial( %this, %mat )
|
|||
%mat.diffuseMap $= %newDiffuse &&
|
||||
%mat.normalMap $= %newNormal &&
|
||||
%mat.detailMap $= %newDetail &&
|
||||
%mat.pbrConfigMap $= %newPBRConfig &&
|
||||
%mat.ormConfigMap $= %newormConfig &&
|
||||
%mat.macroMap $= %newMacro &&
|
||||
%mat.detailSize == %detailSize &&
|
||||
%mat.diffuseSize == %diffuseSize &&
|
||||
|
|
@ -531,7 +531,7 @@ function TerrainMaterialDlg::saveDirtyMaterial( %this, %mat )
|
|||
%mat.macroDistance == %macroDistance &&
|
||||
%mat.parallaxScale == %parallaxScale &&
|
||||
%mat.isSRGB == %isSRGB &&
|
||||
%mat.invertSmoothness == %invertSmoothness)
|
||||
%mat.invertRoughness == %invertRoughness)
|
||||
return;
|
||||
|
||||
// Make sure the material name is unique.
|
||||
|
|
@ -555,7 +555,7 @@ function TerrainMaterialDlg::saveDirtyMaterial( %this, %mat )
|
|||
%mat.diffuseMap = %newDiffuse;
|
||||
%mat.diffuseMapAsset = "";
|
||||
%mat.normalMap = %newNormal;
|
||||
%mat.pbrConfigMap = %newPBRConfig;
|
||||
%mat.ormConfigMap = %newormConfig;
|
||||
%mat.detailMap = %newDetail;
|
||||
%mat.macroMap = %newMacro;
|
||||
%mat.detailSize = %detailSize;
|
||||
|
|
@ -568,7 +568,7 @@ function TerrainMaterialDlg::saveDirtyMaterial( %this, %mat )
|
|||
%mat.useSideProjection = %useSideProjection;
|
||||
%mat.parallaxScale = %parallaxScale;
|
||||
%mat.isSRGB = %isSRGB;
|
||||
%mat.invertSmoothness = %invertSmoothness;
|
||||
%mat.invertRoughness = %invertRoughness;
|
||||
|
||||
// Mark the material as dirty and needing saving.
|
||||
|
||||
|
|
@ -607,7 +607,7 @@ function TerrainMaterialDlg::snapshotMaterials( %this )
|
|||
internalName = %mat.internalName;
|
||||
diffuseMap = %mat.diffuseMap;
|
||||
normalMap = %mat.normalMap;
|
||||
pbrConfigMap = %mat.pbrConfigMap;
|
||||
ormConfigMap = %mat.ormConfigMap;
|
||||
detailMap = %mat.detailMap;
|
||||
macroMap = %mat.macroMap;
|
||||
detailSize = %mat.detailSize;
|
||||
|
|
@ -620,7 +620,7 @@ function TerrainMaterialDlg::snapshotMaterials( %this )
|
|||
useSideProjection = %mat.useSideProjection;
|
||||
parallaxScale = %mat.parallaxScale;
|
||||
isSRGB = %mat.isSRGB;
|
||||
invertSmoothness = %mat.invertSmoothness;
|
||||
invertRoughness = %mat.invertRoughness;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -644,7 +644,7 @@ function TerrainMaterialDlg::restoreMaterials( %this )
|
|||
%mat.setInternalName( %obj.internalName );
|
||||
%mat.diffuseMap = %obj.diffuseMap;
|
||||
%mat.normalMap = %obj.normalMap;
|
||||
%mat.pbrConfigMap = %obj.pbrConfigMap;
|
||||
%mat.ormConfigMap = %obj.ormConfigMap;
|
||||
%mat.detailMap = %obj.detailMap;
|
||||
%mat.macroMap = %obj.macroMap;
|
||||
%mat.detailSize = %obj.detailSize;
|
||||
|
|
@ -657,7 +657,7 @@ function TerrainMaterialDlg::restoreMaterials( %this )
|
|||
%mat.useSideProjection = %obj.useSideProjection;
|
||||
%mat.parallaxScale = %obj.parallaxScale;
|
||||
%mat.isSRGB = %obj.isSRGB;
|
||||
%mat.invertSmoothness = %obj.invertSmoothness;
|
||||
%mat.invertRoughness = %obj.invertRoughness;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue