[Bf-blender-cvs] [6c9dd17] master: Fix T39053: Replace mesh actuator does not replace material (only mesh)

Mitchell Stokes noreply at git.blender.org
Tue Jun 3 03:54:23 CEST 2014


Commit: 6c9dd174a8bc2cd9a857c96f3ddfdb398aa6f88c
Author: Mitchell Stokes
Date:   Mon Jun 2 18:52:13 2014 -0700
https://developer.blender.org/rB6c9dd174a8bc2cd9a857c96f3ddfdb398aa6f88c

Fix T39053: Replace mesh actuator does not replace material (only mesh)

The replace mesh actuator was reconverting the mesh data which causes
conflicts with the LoD code. Instead, we just look for an already
converted mesh, which should already be in the scene.

===================================================================

M	source/gameengine/Converter/KX_ConvertActuators.cpp

===================================================================

diff --git a/source/gameengine/Converter/KX_ConvertActuators.cpp b/source/gameengine/Converter/KX_ConvertActuators.cpp
index b59c26a..7d5527d 100644
--- a/source/gameengine/Converter/KX_ConvertActuators.cpp
+++ b/source/gameengine/Converter/KX_ConvertActuators.cpp
@@ -514,15 +514,7 @@ void BL_ConvertActuators(const char* maggiename,
 					break;
 				case ACT_EDOB_REPLACE_MESH:
 					{
-						RAS_MeshObject *tmpmesh = NULL;
-						if (editobact->me)
-							tmpmesh = BL_ConvertMesh(
-							            editobact->me,
-							            blenderobject,
-							            scene,
-							            converter,
-							            false
-							            );
+						RAS_MeshObject *tmpmesh = converter->FindGameMesh(editobact->me);
 
 						KX_SCA_ReplaceMeshActuator* tmpreplaceact = new KX_SCA_ReplaceMeshActuator(
 						            gameobj,




More information about the Bf-blender-cvs mailing list