Merge pull request #1789 from Areloch/MiscMinorMatEdFixes
Some checks failed
Linux Build / Ubuntu GCC Latest (push) Has been cancelled
Linux Build / Ubuntu GCC 13 (push) Has been cancelled
MacOSX Build / macOS ARM Clang Ninja (push) Has been cancelled
MacOSX Build / macOS ARM Xcode (push) Has been cancelled
Windows Build / Windows MSVC Ninja (push) Has been cancelled
Windows Build / Windows MSVC Visual Studio 2022 (push) Has been cancelled
Windows Build / Windows MSVC Visual Studio 2026 (push) Has been cancelled

Fixes a few minor behavioral issues with the MaterialEditor
This commit is contained in:
Brian Roberts 2026-07-12 14:08:02 -05:00 committed by GitHub
commit 650afbe9af
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 3 deletions

View file

@ -245,6 +245,11 @@ function GuiInspectorTypeMaterialAssetPtr::onControlDropped( %this, %payload, %p
EWorldEditor.isDirty = true; 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) function GuiInspectorGroup::buildMaterialInheritListField(%this, %fieldName, %fieldLabel, %fieldDesc, %fieldDefaultVal, %fieldDataVals, %callbackName, %ownerObj)
{ {
%extent = 18; %extent = 18;

View file

@ -48,7 +48,7 @@ function MaterialEditorGui::establishMaterials(%this)
}; };
} }
if(!isObject(materialEd_previewMaterial)) if(!isObject(materialEd_justAlphaMaterial))
{ {
singleton CustomMaterial( 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. //Custom shader to allow the display of just the alpha channel.
singleton ShaderData( materialEd_justAlphaShader ) singleton ShaderData( materialEd_justAlphaShader )
@ -526,7 +526,8 @@ function MaterialEditorGui::prepareActiveObject( %this, %override )
{ {
%fieldName = %obj.getField(%i); %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; continue;
if( !%canSupportMaterial ) if( !%canSupportMaterial )