From e4df92a7bc8630340567f9e8a6ed93c433daaf2f Mon Sep 17 00:00:00 2001 From: DavidWyand-GG Date: Mon, 13 May 2013 16:49:12 -0400 Subject: [PATCH] Theora texture for cloned material fix When a TSShapeInstance makes a copy of its own materials through cloneMaterialList() (such as done with client side ShapeBase objects), the reference to a named diffuse render target was being lost. This affected using a TheoraTextureObject on a ShapeBase derived object (StaticShape, etc.). --- Engine/source/ts/tsShapeInstance.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Engine/source/ts/tsShapeInstance.cpp b/Engine/source/ts/tsShapeInstance.cpp index a7cebb027..cbe2ffc94 100644 --- a/Engine/source/ts/tsShapeInstance.cpp +++ b/Engine/source/ts/tsShapeInstance.cpp @@ -259,8 +259,10 @@ void TSShapeInstance::cloneMaterialList( const FeatureSet *features ) if ( mOwnMaterialList ) return; + Material::sAllowTextureTargetAssignment = true; mMaterialList = new TSMaterialList(mMaterialList); initMaterialList( features ); + Material::sAllowTextureTargetAssignment = false; mOwnMaterialList = true; }