From 37f28dfbd7e2a007d832453d2e130add1ed25756 Mon Sep 17 00:00:00 2001 From: AzaezelX Date: Fri, 16 May 2025 10:54:00 -0500 Subject: [PATCH] cleanup strays handle clearing composite input textures we no longer have a material value labeled emissive. --- Engine/source/gfx/gfxTextureHandle.cpp | 4 +--- Engine/source/materials/processedMaterial.cpp | 1 + .../tools/materialEditor/scripts/materialEditor.ed.tscript | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Engine/source/gfx/gfxTextureHandle.cpp b/Engine/source/gfx/gfxTextureHandle.cpp index 72c2ef872..53b56ff10 100644 --- a/Engine/source/gfx/gfxTextureHandle.cpp +++ b/Engine/source/gfx/gfxTextureHandle.cpp @@ -80,9 +80,7 @@ bool GFXTexHandle::set(const String &texNameR, const String &texNameG, const Str // Clear the existing texture first, so that // its memory is free for the new allocation. free(); - - // Create and set the new texture. - AssertFatal( texNameR.isNotEmpty(), "Texture name is empty" ); + StrongObjectRef::set( TEXMGR->createCompositeTexture( texNameR, texNameG, texNameB, texNameA, inputKey, profile ) ); #ifdef TORQUE_DEBUG diff --git a/Engine/source/materials/processedMaterial.cpp b/Engine/source/materials/processedMaterial.cpp index d061f9661..ffde35c24 100644 --- a/Engine/source/materials/processedMaterial.cpp +++ b/Engine/source/materials/processedMaterial.cpp @@ -172,6 +172,7 @@ bool ProcessedMaterial::stepInstance() String ProcessedMaterial::_getTexturePath(const String& filename) { + if (filename.isEmpty()) return filename; // if '/', then path is specified, use it. if( filename.find('/') != String::NPos ) { diff --git a/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.tscript b/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.tscript index ba638b509..84334b07c 100644 --- a/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.tscript +++ b/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.tscript @@ -1210,7 +1210,6 @@ function MaterialEditorGui::guiSync( %this, %material ) MaterialEditorPropertiesWindow-->glowMulTextEdit.setText((%material).glowMul[%layer]); MaterialEditorPropertiesWindow-->glowMulSlider.setValue((%material).glowMul[%layer]); MaterialEditorPropertiesWindow-->glowCheckbox.setValue((%material).glow[%layer]); - MaterialEditorPropertiesWindow-->emissiveCheckbox.setValue((%material).emissive[%layer]); MaterialEditorPropertiesWindow-->receiveShadowsCheckbox.setValue((%material).receiveShadows[%layer]); MaterialEditorPropertiesWindow-->ignoreLightingCheckbox.setValue((%material).ignoreLighting[%layer]); MaterialEditorPropertiesWindow-->parallaxTextEdit.setText((%material).parallaxScale[%layer]);