mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 08:34:40 +00:00
Update materialEditor.ed.tscript
cleanup materialEditor script
This commit is contained in:
parent
fad397d914
commit
4d14610753
1 changed files with 4 additions and 4 deletions
|
|
@ -864,7 +864,7 @@ function MaterialEditorGui::convertMaterialTextureField(%this, %material, %mapNa
|
||||||
for(%index = 0; %index < 4; %index++)
|
for(%index = 0; %index < 4; %index++)
|
||||||
{
|
{
|
||||||
%mapFile = %material.call("get" @ %mapName, %index);
|
%mapFile = %material.call("get" @ %mapName, %index);
|
||||||
if(%mapFile !$= "" && !isFile(%mapFile))
|
if(%mapFile !$= "")
|
||||||
{
|
{
|
||||||
if(isFile(%mapFile))
|
if(isFile(%mapFile))
|
||||||
{
|
{
|
||||||
|
|
@ -874,9 +874,10 @@ function MaterialEditorGui::convertMaterialTextureField(%this, %material, %mapNa
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
%assetPtr = %material.call("get" @ %mapName @ "Asset", %index);
|
%firstChar = getSubStr( %mapFile, 0, 1 );
|
||||||
if(%assetPtr.isNamedTarget())
|
if(%firstChar $= "#" || %firstChar $= "$" ) // we are a named target
|
||||||
{
|
{
|
||||||
|
%assetPtr = %material.call("get" @ %mapName @ "Asset", %index);
|
||||||
MaterialEditorGui.currentMaterial.call("set" @ %mapName, %assetPtr, %index);
|
MaterialEditorGui.currentMaterial.call("set" @ %mapName, %assetPtr, %index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1099,7 +1100,6 @@ function MaterialEditorGui::guiSync( %this, %material )
|
||||||
//Diffuse
|
//Diffuse
|
||||||
%diffuseMap = (%material).getDiffuseMap(%layer);
|
%diffuseMap = (%material).getDiffuseMap(%layer);
|
||||||
%diffuseMapText = %diffuseMap !$= "" && %diffuseMap !$=$MaterialEditor::emptyMaterialImage ? (%material).getDiffuseMapAsset(%layer) : "None";
|
%diffuseMapText = %diffuseMap !$= "" && %diffuseMap !$=$MaterialEditor::emptyMaterialImage ? (%material).getDiffuseMapAsset(%layer) : "None";
|
||||||
|
|
||||||
MaterialEditorPropertiesWindow-->diffuseMapNameText.setText( %diffuseMapText );
|
MaterialEditorPropertiesWindow-->diffuseMapNameText.setText( %diffuseMapText );
|
||||||
MaterialEditorPropertiesWindow-->diffuseMapDisplayBitmap.setBitmap( getAssetPreviewImage(%diffuseMapText) );
|
MaterialEditorPropertiesWindow-->diffuseMapDisplayBitmap.setBitmap( getAssetPreviewImage(%diffuseMapText) );
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue