mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 07:34:45 +00:00
Fixes a few minor behavioral issues with the MaterialEditor
- Fixes not properly handling TypeMaterialAssetRef - Fixed erroneous sanity checks that prevented temp editing mats from being made for the editor
This commit is contained in:
parent
79f773f38d
commit
0dfab42763
2 changed files with 9 additions and 3 deletions
|
|
@ -245,6 +245,11 @@ function GuiInspectorTypeMaterialAssetPtr::onControlDropped( %this, %payload, %p
|
|||
EWorldEditor.isDirty = true;
|
||||
}
|
||||
|
||||
function GuiInspectorTypeMaterialAssetRef::onControlDropped( %this, %payload, %position )
|
||||
{
|
||||
GuiInspectorTypeMaterialAssetPtr::onControlDropped( %this, %payload, %position );
|
||||
}
|
||||
|
||||
function GuiInspectorGroup::buildMaterialInheritListField(%this, %fieldName, %fieldLabel, %fieldDesc, %fieldDefaultVal, %fieldDataVals, %callbackName, %ownerObj)
|
||||
{
|
||||
%extent = 18;
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ function MaterialEditorGui::establishMaterials(%this)
|
|||
};
|
||||
}
|
||||
|
||||
if(!isObject(materialEd_previewMaterial))
|
||||
if(!isObject(materialEd_justAlphaMaterial))
|
||||
{
|
||||
singleton CustomMaterial( materialEd_justAlphaMaterial )
|
||||
{
|
||||
|
|
@ -57,7 +57,7 @@ function MaterialEditorGui::establishMaterials(%this)
|
|||
};
|
||||
}
|
||||
|
||||
if(!isObject(materialEd_previewMaterial))
|
||||
if(!isObject(materialEd_justAlphaShader))
|
||||
{
|
||||
//Custom shader to allow the display of just the alpha channel.
|
||||
singleton ShaderData( materialEd_justAlphaShader )
|
||||
|
|
@ -526,7 +526,8 @@ function MaterialEditorGui::prepareActiveObject( %this, %override )
|
|||
{
|
||||
%fieldName = %obj.getField(%i);
|
||||
|
||||
if( %obj.getFieldType(%fieldName) !$= "TypeMaterialAssetId" && %obj.getFieldType(%fieldName) !$= "TypeMaterialAssetPtr")
|
||||
if( %obj.getFieldType(%fieldName) !$= "TypeMaterialAssetId" && %obj.getFieldType(%fieldName) !$= "TypeMaterialAssetPtr"
|
||||
&& %obj.getFieldType(%fieldName) !$= "TypeMaterialAssetRef")
|
||||
continue;
|
||||
|
||||
if( !%canSupportMaterial )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue