blender/source/gameengine/Ketsji
Kester Maddock 6c4ae1eb54 Patch: [ #2439 ] Makes objects react properly to deformations after a mesh replacement call.
from brian hayward (bthayward)

Detailed description:
 Currently, when an armature deformed object's mesh is replaced by the ReplaceMesh actuator, the new mesh fails to deform to the armature's movement.

 My patch fixes this by properly replacing the deform controller along with the mesh (when appropriete).

 For instance, if one had an animated character using any of the standard deformation techniques (armature, ipo, RVK, or AVK), that character's mesh would currently be prevented from changing mid-game. It could be replaced, but the new mesh would lack the controller which tells it how to deform. If one wanted to dynamiclly add a hat on top of the character's head, it would require storing a secondary prebuilt character (mesh, armature, logic, ect...) on another layer FOR EACH HAT the character could possibly wear, then swapping out the whole character when the hat change was desired. So if you had 4 possible hat/character combos, you would have 4 character meshes, 4 armatures, 4 sets of logic, and so on. I find this lack of flexibility to be unresonable.

 With my patch, one could accomplish the same thing mearly by making one version of the character in the main layer, and adding an invisible object atop the character's head (which is parented to the head bone). Then whenever it becomes desirable, one can replace the invisible object's mesh with the desirable hat's mesh, then make it visible. With my patch, the hat object would then continue to deform to the character's head regardless of which hat was currently being worn.

 *note 1*
 for armature/mesh deformations, the new mesh must have properly assigned vertex groups which match one or more of the bones of the target armature before the replaceMesh call is made. Otherwise the vertices won't react to the armature because they won't know how. (not sure if vertices can be scripted to change groups after the game has started)

 *note 2*
 The added processing time involved with replacing the object's deform controller is negligible.
2005-04-18 11:44:21 +00:00
..
KXNetwork Switch fixed time system. Logic updates should now happen at 30Hz, physics at 60Hz. (By default, use Python to set.) Some actuators still run at framerate (IPO, Action) for nice smooth animation, and an excuse to buy high end hardware. 2004-10-16 11:41:50 +00:00
KX_Camera.cpp Fix bug #1460: Camera IPOs Broken (Gameengine) 2004-07-22 00:26:34 +00:00
KX_Camera.h Fix bug #1460: Camera IPOs Broken (Gameengine) 2004-07-22 00:26:34 +00:00
KX_CameraActuator.cpp big warning hunt commit 2005-03-09 19:45:59 +00:00
KX_CameraActuator.h Python methods for camera actuators (thanks snailrose) 2004-12-29 01:33:15 +00:00
KX_CameraIpoSGController.cpp Fix bug #1460: Camera IPOs Broken (Gameengine) 2004-07-22 00:26:34 +00:00
KX_CameraIpoSGController.h [GameEngine] Commit all Kester's changes made to the gameengine to restore 2.25 like physics. 2004-03-22 22:02:18 +00:00
KX_CDActuator.cpp Switch fixed time system. Logic updates should now happen at 30Hz, physics at 60Hz. (By default, use Python to set.) Some actuators still run at framerate (IPO, Action) for nice smooth animation, and an excuse to buy high end hardware. 2004-10-16 11:41:50 +00:00
KX_CDActuator.h Switch fixed time system. Logic updates should now happen at 30Hz, physics at 60Hz. (By default, use Python to set.) Some actuators still run at framerate (IPO, Action) for nice smooth animation, and an excuse to buy high end hardware. 2004-10-16 11:41:50 +00:00
KX_ClientObjectInfo.h Speed up the physics engine: hook the SOLID broad phase, so we can either reject the test or request the penetration depth test as necessary. Previously we were doing the penetration depth test, as well as SOLID's intersection test. 2004-11-06 04:58:10 +00:00
KX_ConstraintActuator.cpp Switch fixed time system. Logic updates should now happen at 30Hz, physics at 60Hz. (By default, use Python to set.) Some actuators still run at framerate (IPO, Action) for nice smooth animation, and an excuse to buy high end hardware. 2004-10-16 11:41:50 +00:00
KX_ConstraintActuator.h Switch fixed time system. Logic updates should now happen at 30Hz, physics at 60Hz. (By default, use Python to set.) Some actuators still run at framerate (IPO, Action) for nice smooth animation, and an excuse to buy high end hardware. 2004-10-16 11:41:50 +00:00
KX_ConstraintWrapper.cpp Changed Python _getattr/_setattr methods to use const STR_String& instead of char* - makes using these methods much nicer. 2004-05-16 13:05:15 +00:00
KX_ConstraintWrapper.h Changed Python _getattr/_setattr methods to use const STR_String& instead of char* - makes using these methods much nicer. 2004-05-16 13:05:15 +00:00
KX_ConvertPhysicsObject.h Fix for bug 1600: alpha sort doesn't work on linked (alt-d) objects 2004-11-22 11:49:35 +00:00
KX_ConvertPhysicsObjects.cpp Big patches: 2005-03-25 10:33:39 +00:00
KX_EmptyObject.cpp Last of the config.h mods... 2002-11-25 15:29:57 +00:00
KX_EmptyObject.h Removed the config.h thing from the .h's in the source dir. 2002-12-27 13:11:01 +00:00
KX_GameActuator.cpp big warning hunt commit 2005-03-09 19:45:59 +00:00
KX_GameActuator.h Switch fixed time system. Logic updates should now happen at 30Hz, physics at 60Hz. (By default, use Python to set.) Some actuators still run at framerate (IPO, Action) for nice smooth animation, and an excuse to buy high end hardware. 2004-10-16 11:41:50 +00:00
KX_GameObject.cpp Patch: [ #2439 ] Makes objects react properly to deformations after a mesh replacement call. 2005-04-18 11:44:21 +00:00
KX_GameObject.h Patch: [ #2439 ] Makes objects react properly to deformations after a mesh replacement call. 2005-04-18 11:44:21 +00:00
KX_IInterpolator.h Removed the config.h thing from the .h's in the source dir. 2002-12-27 13:11:01 +00:00
KX_IPhysicsController.cpp Big patches: 2005-03-25 10:33:39 +00:00
KX_IPhysicsController.h Big patches: 2005-03-25 10:33:39 +00:00
KX_IPO_SGController.cpp Big patches: 2005-03-25 10:33:39 +00:00
KX_IPO_SGController.h Big patches: 2005-03-25 10:33:39 +00:00
KX_IpoActuator.cpp Don't try to interpolate from prop ipo actuators 2004-12-06 10:58:38 +00:00
KX_IpoActuator.h Fix IPO actuator (Bug #1694) 2004-11-03 10:48:02 +00:00
KX_IPOTransform.h Removed the config.h thing from the .h's in the source dir. 2002-12-27 13:11:01 +00:00
KX_IScalarInterpolator.h Removed the config.h thing from the .h's in the source dir. 2002-12-27 13:11:01 +00:00
KX_ISceneConverter.h Removed the config.h thing from the .h's in the source dir. 2002-12-27 13:11:01 +00:00
KX_ISystem.h Removed the config.h thing from the .h's in the source dir. 2002-12-27 13:11:01 +00:00
KX_KetsjiEngine.cpp Big patches: 2005-03-25 10:33:39 +00:00
KX_KetsjiEngine.h Big patches: 2005-03-25 10:33:39 +00:00
KX_Light.cpp Port Python updates from Tuhopuu2: 2004-07-17 05:28:23 +00:00
KX_Light.h Added Python module for Lights. 2004-05-30 11:09:46 +00:00
KX_LightIpoSGController.cpp Last of the config.h mods... 2002-11-25 15:29:57 +00:00
KX_LightIpoSGController.h [GameEngine] Commit all Kester's changes made to the gameengine to restore 2.25 like physics. 2004-03-22 22:02:18 +00:00
KX_MeshProxy.cpp Unified KX_BlenderPolyMaterial & GPC_PolygonMaterial into KX_PolygonMaterial. 2005-01-16 06:02:06 +00:00
KX_MeshProxy.h Changed Python _getattr/_setattr methods to use const STR_String& instead of char* - makes using these methods much nicer. 2004-05-16 13:05:15 +00:00
KX_MotionState.cpp Last of the config.h mods... 2002-11-25 15:29:57 +00:00
KX_MotionState.h Removed the config.h thing from the .h's in the source dir. 2002-12-27 13:11:01 +00:00
KX_MouseFocusSensor.cpp I'll break this commit into two sections in the moto files 2005-03-25 16:31:05 +00:00
KX_MouseFocusSensor.h Big patches: 2005-03-25 10:33:39 +00:00
KX_NearSensor.cpp Big patches: 2005-03-25 10:33:39 +00:00
KX_NearSensor.h Big patches: 2005-03-25 10:33:39 +00:00
KX_ObColorIpoSGController.cpp Last of the config.h mods... 2002-11-25 15:29:57 +00:00
KX_ObColorIpoSGController.h [GameEngine] Commit all Kester's changes made to the gameengine to restore 2.25 like physics. 2004-03-22 22:02:18 +00:00
KX_ObjectActuator.cpp Switch fixed time system. Logic updates should now happen at 30Hz, physics at 60Hz. (By default, use Python to set.) Some actuators still run at framerate (IPO, Action) for nice smooth animation, and an excuse to buy high end hardware. 2004-10-16 11:41:50 +00:00
KX_ObjectActuator.h Switch fixed time system. Logic updates should now happen at 30Hz, physics at 60Hz. (By default, use Python to set.) Some actuators still run at framerate (IPO, Action) for nice smooth animation, and an excuse to buy high end hardware. 2004-10-16 11:41:50 +00:00
KX_OdePhysicsController.cpp Big patches: 2005-03-25 10:33:39 +00:00
KX_OdePhysicsController.h Big patches: 2005-03-25 10:33:39 +00:00
KX_OrientationInterpolator.cpp Last of the config.h mods... 2002-11-25 15:29:57 +00:00
KX_OrientationInterpolator.h Removed the config.h thing from the .h's in the source dir. 2002-12-27 13:11:01 +00:00
KX_PhysicsEngineEnums.h [GameEngine] Commit all Kester's changes made to the gameengine to restore 2.25 like physics. 2004-03-22 22:02:18 +00:00
KX_PhysicsObjectWrapper.cpp Changed Python _getattr/_setattr methods to use const STR_String& instead of char* - makes using these methods much nicer. 2004-05-16 13:05:15 +00:00
KX_PhysicsObjectWrapper.h Changed Python _getattr/_setattr methods to use const STR_String& instead of char* - makes using these methods much nicer. 2004-05-16 13:05:15 +00:00
KX_PhysicsPropertiesobsolete.h Removed the config.h thing from the .h's in the source dir. 2002-12-27 13:11:01 +00:00
KX_PolygonMaterial.cpp Big patches: 2005-03-25 10:33:39 +00:00
KX_PolygonMaterial.h Unified KX_BlenderPolyMaterial & GPC_PolygonMaterial into KX_PolygonMaterial. 2005-01-16 06:02:06 +00:00
KX_PositionInterpolator.cpp Last of the config.h mods... 2002-11-25 15:29:57 +00:00
KX_PositionInterpolator.h Removed the config.h thing from the .h's in the source dir. 2002-12-27 13:11:01 +00:00
KX_PyConstraintBinding.cpp Big patches: 2005-03-25 10:33:39 +00:00
KX_PyConstraintBinding.h Big patches: 2005-03-25 10:33:39 +00:00
KX_PyMath.cpp big warning hunt commit 2005-03-09 19:45:59 +00:00
KX_PyMath.h big warning hunt commit 2005-03-09 19:45:59 +00:00
KX_PythonInit.cpp Big patches: 2005-03-25 10:33:39 +00:00
KX_PythonInit.h Fixes for Camera objects and python: 2004-05-21 09:18:42 +00:00
KX_RadarSensor.cpp Big patches: 2005-03-25 10:33:39 +00:00
KX_RadarSensor.h Big patches: 2005-03-25 10:33:39 +00:00
KX_RayCast.cpp added an #include <stdlib.h> to fix this: 2005-03-25 13:18:13 +00:00
KX_RayCast.h Big patches: 2005-03-25 10:33:39 +00:00
KX_RayEventManager.cpp Switch fixed time system. Logic updates should now happen at 30Hz, physics at 60Hz. (By default, use Python to set.) Some actuators still run at framerate (IPO, Action) for nice smooth animation, and an excuse to buy high end hardware. 2004-10-16 11:41:50 +00:00
KX_RayEventManager.h Switch fixed time system. Logic updates should now happen at 30Hz, physics at 60Hz. (By default, use Python to set.) Some actuators still run at framerate (IPO, Action) for nice smooth animation, and an excuse to buy high end hardware. 2004-10-16 11:41:50 +00:00
KX_RaySensor.cpp Big patches: 2005-03-25 10:33:39 +00:00
KX_RaySensor.h Big patches: 2005-03-25 10:33:39 +00:00
KX_SCA_AddObjectActuator.cpp big warning hunt commit 2005-03-09 19:45:59 +00:00
KX_SCA_AddObjectActuator.h Switch fixed time system. Logic updates should now happen at 30Hz, physics at 60Hz. (By default, use Python to set.) Some actuators still run at framerate (IPO, Action) for nice smooth animation, and an excuse to buy high end hardware. 2004-10-16 11:41:50 +00:00
KX_SCA_EndObjectActuator.cpp big warning hunt commit 2005-03-09 19:45:59 +00:00
KX_SCA_EndObjectActuator.h Switch fixed time system. Logic updates should now happen at 30Hz, physics at 60Hz. (By default, use Python to set.) Some actuators still run at framerate (IPO, Action) for nice smooth animation, and an excuse to buy high end hardware. 2004-10-16 11:41:50 +00:00
KX_SCA_ReplaceMeshActuator.cpp big warning hunt commit 2005-03-09 19:45:59 +00:00
KX_SCA_ReplaceMeshActuator.h Switch fixed time system. Logic updates should now happen at 30Hz, physics at 60Hz. (By default, use Python to set.) Some actuators still run at framerate (IPO, Action) for nice smooth animation, and an excuse to buy high end hardware. 2004-10-16 11:41:50 +00:00
KX_ScalarInterpolator.cpp Last of the config.h mods... 2002-11-25 15:29:57 +00:00
KX_ScalarInterpolator.h Removed the config.h thing from the .h's in the source dir. 2002-12-27 13:11:01 +00:00
KX_ScalingInterpolator.cpp Last of the config.h mods... 2002-11-25 15:29:57 +00:00
KX_ScalingInterpolator.h Removed the config.h thing from the .h's in the source dir. 2002-12-27 13:11:01 +00:00
KX_Scene.cpp Patch: [ #2439 ] Makes objects react properly to deformations after a mesh replacement call. 2005-04-18 11:44:21 +00:00
KX_Scene.h Big patches: 2005-03-25 10:33:39 +00:00
KX_SceneActuator.cpp big warning hunt commit 2005-03-09 19:45:59 +00:00
KX_SceneActuator.h Switch fixed time system. Logic updates should now happen at 30Hz, physics at 60Hz. (By default, use Python to set.) Some actuators still run at framerate (IPO, Action) for nice smooth animation, and an excuse to buy high end hardware. 2004-10-16 11:41:50 +00:00
KX_SG_NodeRelationships.cpp Big patches: 2005-03-25 10:33:39 +00:00
KX_SG_NodeRelationships.h Added an UpdateTransform callback from SceneGraph -> Physics. 2004-05-26 12:06:41 +00:00
KX_SoundActuator.cpp Big patches: 2005-03-25 10:33:39 +00:00
KX_SoundActuator.h Switch fixed time system. Logic updates should now happen at 30Hz, physics at 60Hz. (By default, use Python to set.) Some actuators still run at framerate (IPO, Action) for nice smooth animation, and an excuse to buy high end hardware. 2004-10-16 11:41:50 +00:00
KX_SumoPhysicsController.cpp Big patches: 2005-03-25 10:33:39 +00:00
KX_SumoPhysicsController.h Big patches: 2005-03-25 10:33:39 +00:00
KX_TimeCategoryLogger.cpp Last of the config.h mods... 2002-11-25 15:29:57 +00:00
KX_TimeCategoryLogger.h Removed the config.h thing from the .h's in the source dir. 2002-12-27 13:11:01 +00:00
KX_TimeLogger.cpp [GameEngine] Commit all Kester's changes made to the gameengine to restore 2.25 like physics. 2004-03-22 22:02:18 +00:00
KX_TimeLogger.h Removed the config.h thing from the .h's in the source dir. 2002-12-27 13:11:01 +00:00
KX_TouchEventManager.cpp Big patches: 2005-03-25 10:33:39 +00:00
KX_TouchEventManager.h Big patches: 2005-03-25 10:33:39 +00:00
KX_TouchSensor.cpp Big patches: 2005-03-25 10:33:39 +00:00
KX_TouchSensor.h Big patches: 2005-03-25 10:33:39 +00:00
KX_TrackToActuator.cpp Switch fixed time system. Logic updates should now happen at 30Hz, physics at 60Hz. (By default, use Python to set.) Some actuators still run at framerate (IPO, Action) for nice smooth animation, and an excuse to buy high end hardware. 2004-10-16 11:41:50 +00:00
KX_TrackToActuator.h Switch fixed time system. Logic updates should now happen at 30Hz, physics at 60Hz. (By default, use Python to set.) Some actuators still run at framerate (IPO, Action) for nice smooth animation, and an excuse to buy high end hardware. 2004-10-16 11:41:50 +00:00
KX_VertexProxy.cpp Unified KX_BlenderPolyMaterial & GPC_PolygonMaterial into KX_PolygonMaterial. 2005-01-16 06:02:06 +00:00
KX_VertexProxy.h Unified KX_BlenderPolyMaterial & GPC_PolygonMaterial into KX_PolygonMaterial. 2005-01-16 06:02:06 +00:00
KX_VisibilityActuator.cpp Switch fixed time system. Logic updates should now happen at 30Hz, physics at 60Hz. (By default, use Python to set.) Some actuators still run at framerate (IPO, Action) for nice smooth animation, and an excuse to buy high end hardware. 2004-10-16 11:41:50 +00:00
KX_VisibilityActuator.h Switch fixed time system. Logic updates should now happen at 30Hz, physics at 60Hz. (By default, use Python to set.) Some actuators still run at framerate (IPO, Action) for nice smooth animation, and an excuse to buy high end hardware. 2004-10-16 11:41:50 +00:00
KX_WorldInfo.cpp Last of the config.h mods... 2002-11-25 15:29:57 +00:00
KX_WorldInfo.h Removed the config.h thing from the .h's in the source dir. 2002-12-27 13:11:01 +00:00
KX_WorldIpoController.cpp big warning hunt commit 2005-03-09 19:45:59 +00:00
KX_WorldIpoController.h [GameEngine] Commit all Kester's changes made to the gameengine to restore 2.25 like physics. 2004-03-22 22:02:18 +00:00
Makefile Port Python updates from Tuhopuu2: 2004-07-17 05:28:23 +00:00
SConscript Big patches: 2005-03-25 10:33:39 +00:00