blender/source/gameengine/Ketsji
Benoit Bolsee 9b4956ae22 BGE patch: KX_STATEx constant to allow simple state manipulation in setState()
The constants KX_STATE1 to KX_STATE30 can be used 
with setState() to change the object state in a 
python controller. The constants are defined in the 
GameLogic module so that the full name is 
GameLogic.KX_STATE1 to GameLogic.KX_STATE30 but you
can simplify this with the import statement:

from GameLogic import *
cont = getCurrentController()
ob = cont.getOwner()
ob.setState(KX_STATE2)		#go to state 2

KX_STATEx constants are defined as (1<<(x-1))
Binary operators |, &, ^ and ~ can be used to combine states:

You can activate more than one state at a time with the | operator:

ob.setState(KX_STATE1|KX_STATE2)  #activate state 1 and 2, stop all others

You can add a state to the current state mask with:

state = ob.getState()
ob.setState(state|KX_STATE3)      #activate state 3, keep others

You can substract a state to the current state mask with the & and operator:

state = ob.getState()
ob.setState(state&~KX_STATE2)     #stop state 2, keep others

You can invert a state with the ^ operator:

state = ob.getState()
ob.setState(state^KX_STATE2)     #invert state 2, keep others
2008-09-22 19:54:30 +00:00
..
KXNetwork [#17600] char* -> const char* 2008-09-20 11:08:35 +00:00
BL_BlenderShader.cpp * GLSL lamps now respect 3d viewport layers. 2008-09-05 14:33:36 +00:00
BL_BlenderShader.h Merge of first part of changes from the apricot branch, especially 2008-09-04 20:51:28 +00:00
BL_Material.cpp Sync with Apricot Game Engine 2008-07-10 12:47:20 +00:00
BL_Material.h Merge of first part of changes from the apricot branch, especially 2008-09-04 20:51:28 +00:00
BL_Shader.cpp [#17600] char* -> const char* 2008-09-20 11:08:35 +00:00
BL_Shader.h [#17600] char* -> const char* 2008-09-20 11:08:35 +00:00
BL_Texture.cpp Game Engine: alpha blending and sorting 2008-07-29 15:48:31 +00:00
BL_Texture.h First commit! Small bug fix for cube map crashing in the player. 2007-01-13 08:30:08 +00:00
CMakeLists.txt Merge of first part of changes from the apricot branch, especially 2008-09-04 20:51:28 +00:00
KX_BlenderMaterial.cpp Merge of first part of changes from the apricot branch, especially 2008-09-04 20:51:28 +00:00
KX_BlenderMaterial.h Merge of first part of changes from the apricot branch, especially 2008-09-04 20:51:28 +00:00
KX_BulletPhysicsController.cpp == Grease Pencil == 2008-07-22 09:53:25 +00:00
KX_BulletPhysicsController.h BGE patch: Optimization of bullet adaptation layer - part 1. 2008-07-21 12:37:27 +00:00
KX_Camera.cpp Checked all cases where PyArg_ParseTuple is used in blenders game engine and made sure all will raise errors when called with invalid args. 2008-07-01 16:43:46 +00:00
KX_Camera.h fix BGE bug #8646: unusable anaglyph settings 2008-05-24 08:34:04 +00:00
KX_CameraActuator.cpp [#17600] char* -> const char* 2008-09-20 11:08:35 +00:00
KX_CameraActuator.h Python API get/setObject update for Actuators. (SetParent, AddObject, Camera and TrackTo) 2008-08-14 08:58:25 +00:00
KX_CameraIpoSGController.cpp Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_CameraIpoSGController.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_CDActuator.cpp Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_CDActuator.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_ClientObjectInfo.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_ConstraintActuator.cpp [#17600] char* -> const char* 2008-09-20 11:08:35 +00:00
KX_ConstraintActuator.h [#17600] char* -> const char* 2008-09-20 11:08:35 +00:00
KX_ConstraintWrapper.cpp converted my gen_utils.h fix to PyObjectPlus.h 2008-09-06 14:13:31 +00:00
KX_ConstraintWrapper.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_ConvertPhysicsObject.h BGE real-time soft bodies, step 2 / 3: create a btSoftBody. Next step is hooking up / deform graphics mesh and choose collision shape. 2008-09-21 15:17:50 +00:00
KX_ConvertPhysicsObjects.cpp BGE real-time soft bodies, step 2 / 3: create a btSoftBody. Next step is hooking up / deform graphics mesh and choose collision shape. 2008-09-21 15:17:50 +00:00
KX_EmptyObject.cpp Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_EmptyObject.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_GameActuator.cpp [#17600] char* -> const char* 2008-09-20 11:08:35 +00:00
KX_GameActuator.h save and load configuration actuator, (option in game actuator menu) 2008-09-12 02:15:16 +00:00
KX_GameObject.cpp BGE bug fix: dupligroup scale not correctly applied to bullet shape. 2008-09-20 22:19:59 +00:00
KX_GameObject.h BGE bug #17549: fix crash on removeParent() with static mesh. Fix scaling bug on setParent(). Add python setWorldPosition() to allow setting object position in world coordinate regardless if it is a root or a child object. 2008-09-09 22:40:10 +00:00
KX_IInterpolator.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_IPhysicsController.cpp Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_IPhysicsController.h BGE patch: Optimization of bullet adaptation layer - part 1. 2008-07-21 12:37:27 +00:00
KX_IPO_SGController.cpp BGE bugfix, ipo actuator's foce option didnt check that the object was dynamic. 2008-08-27 06:02:10 +00:00
KX_IPO_SGController.h BGE logic patch: new "Add" mode for Ipo actuator, several corrections in state system. 2008-07-08 12:18:43 +00:00
KX_IpoActuator.cpp [#17600] char* -> const char* 2008-09-20 11:08:35 +00:00
KX_IpoActuator.h BGE patch: Add PyDoc for new logic bricks, set exception message on Py error, remove args on Py functions that don't take any to save CPU time 2008-07-23 21:37:37 +00:00
KX_IPOTransform.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_IScalarInterpolator.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_ISceneConverter.h Merge of first part of changes from the apricot branch, especially 2008-09-04 20:51:28 +00:00
KX_ISystem.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_KetsjiEngine.cpp Fix for bug #3858: the game engine mouse focus sensor did not work 2008-09-18 01:46:28 +00:00
KX_KetsjiEngine.h Fix for bug #3858: the game engine mouse focus sensor did not work 2008-09-18 01:46:28 +00:00
KX_Light.cpp Fix for bug #17589: removing a lamp in the game engine with glsl 2008-09-10 09:51:06 +00:00
KX_Light.h Merge of first part of changes from the apricot branch, especially 2008-09-04 20:51:28 +00:00
KX_LightIpoSGController.cpp Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_LightIpoSGController.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_MaterialIpoController.cpp Win64: please check my changes if you ran across them ;) But should be fine since no additional crashes were reported! 2008-08-17 17:08:00 +00:00
KX_MaterialIpoController.h BGE patch: approve patch #17312: Multiple material IPOs per mesh in BGE. 2008-07-25 13:45:57 +00:00
KX_MeshProxy.cpp converted my gen_utils.h fix to PyObjectPlus.h 2008-09-06 14:13:31 +00:00
KX_MeshProxy.h BGE patch: KX_GameObject::rayCast() improvements to have X-Ray option, return true face normal and hit polygon information. 2008-08-27 19:34:19 +00:00
KX_MotionState.cpp Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_MotionState.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_MouseFocusSensor.cpp [#17600] char* -> const char* 2008-09-20 11:08:35 +00:00
KX_MouseFocusSensor.h Fix for bug #3858: the game engine mouse focus sensor did not work 2008-09-18 01:46:28 +00:00
KX_NearSensor.cpp BGE patch: logic optimization part 2: remove inactive sensors from logic manager. 2008-07-30 17:41:47 +00:00
KX_NearSensor.h BGE patch: logic optimization part 2: remove inactive sensors from logic manager. 2008-07-30 17:41:47 +00:00
KX_ObColorIpoSGController.cpp Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_ObColorIpoSGController.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_ObjectActuator.cpp game engine python api 2008-08-14 03:23:36 +00:00
KX_ObjectActuator.h BGE patch: Add PyDoc for new logic bricks, set exception message on Py error, remove args on Py functions that don't take any to save CPU time 2008-07-23 21:37:37 +00:00
KX_OdePhysicsController.cpp BGE patch: Optimization of bullet adaptation layer - part 1. 2008-07-21 12:37:27 +00:00
KX_OdePhysicsController.h BGE patch: Optimization of bullet adaptation layer - part 1. 2008-07-21 12:37:27 +00:00
KX_OrientationInterpolator.cpp Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_OrientationInterpolator.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_ParentActuator.cpp [#17600] char* -> const char* 2008-09-20 11:08:35 +00:00
KX_ParentActuator.h Python API get/setObject update for Actuators. (SetParent, AddObject, Camera and TrackTo) 2008-08-14 08:58:25 +00:00
KX_PhysicsEngineEnums.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_PhysicsObjectWrapper.cpp converted my gen_utils.h fix to PyObjectPlus.h 2008-09-06 14:13:31 +00:00
KX_PhysicsObjectWrapper.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_PhysicsPropertiesobsolete.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_PolygonMaterial.cpp Merge of first part of changes from the apricot branch, especially 2008-09-04 20:51:28 +00:00
KX_PolygonMaterial.h Merge of first part of changes from the apricot branch, especially 2008-09-04 20:51:28 +00:00
KX_PolyProxy.cpp Merge of first part of changes from the apricot branch, especially 2008-09-04 20:51:28 +00:00
KX_PolyProxy.h BGE patch: KX_GameObject::rayCast() improvements to have X-Ray option, return true face normal and hit polygon information. 2008-08-27 19:34:19 +00:00
KX_PositionInterpolator.cpp Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_PositionInterpolator.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_PyConstraintBinding.cpp converted my gen_utils.h fix to PyObjectPlus.h 2008-09-06 14:13:31 +00:00
KX_PyConstraintBinding.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_PyMath.cpp Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_PyMath.h added exception messages to game engine matrix and vector conversions. also removed own unneeded defines in arithb.c 2008-07-25 21:14:23 +00:00
KX_PythonInit.cpp BGE patch: KX_STATEx constant to allow simple state manipulation in setState() 2008-09-22 19:54:30 +00:00
KX_PythonInit.h save and load configuration actuator, (option in game actuator menu) 2008-09-12 02:15:16 +00:00
KX_RadarSensor.cpp [#17600] char* -> const char* 2008-09-20 11:08:35 +00:00
KX_RadarSensor.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_RayCast.cpp BGE patch: KX_GameObject::rayCast() improvements to have X-Ray option, return true face normal and hit polygon information. 2008-08-27 19:34:19 +00:00
KX_RayCast.h BGE patch: KX_GameObject::rayCast() improvements to have X-Ray option, return true face normal and hit polygon information. 2008-08-27 19:34:19 +00:00
KX_RayEventManager.cpp BGE patch: logic optimization part 2: remove inactive sensors from logic manager. 2008-07-30 17:41:47 +00:00
KX_RayEventManager.h BGE patch: logic optimization part 2: remove inactive sensors from logic manager. 2008-07-30 17:41:47 +00:00
KX_RaySensor.cpp [#17600] char* -> const char* 2008-09-20 11:08:35 +00:00
KX_RaySensor.h BGE patch: add X-Ray option to ray sensor. The option is effective only if a property is set: the sensor will ignore the objects that don't have the property. 2008-08-28 19:37:49 +00:00
KX_SCA_AddObjectActuator.cpp [#17600] char* -> const char* 2008-09-20 11:08:35 +00:00
KX_SCA_AddObjectActuator.h get/set Angular velocity for KX_GameObjects python api and for the AddObject actuator. 2008-08-27 03:34:53 +00:00
KX_SCA_DynamicActuator.cpp BGE patch 15044 approved: Edit Object Dynamics Actuator. 2008-06-25 14:09:15 +00:00
KX_SCA_DynamicActuator.h BGE patch 15044 approved: Edit Object Dynamics Actuator. 2008-06-25 14:09:15 +00:00
KX_SCA_EndObjectActuator.cpp Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_SCA_EndObjectActuator.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_SCA_ReplaceMeshActuator.cpp [#17600] char* -> const char* 2008-09-20 11:08:35 +00:00
KX_SCA_ReplaceMeshActuator.h BGE Py API 2008-09-05 02:53:12 +00:00
KX_ScalarInterpolator.cpp Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_ScalarInterpolator.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_ScalingInterpolator.cpp Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_ScalingInterpolator.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_Scene.cpp BGE bug fix: dupligroup scale not correctly applied to bullet shape. 2008-09-20 22:19:59 +00:00
KX_Scene.h Merge of first part of changes from the apricot branch, especially 2008-09-04 20:51:28 +00:00
KX_SceneActuator.cpp [#17600] char* -> const char* 2008-09-20 11:08:35 +00:00
KX_SceneActuator.h BGE patch: Relink actuators with target within group when duplicating group; generalize protection against object deletion for all actuators that point to objects. 2008-07-19 07:45:19 +00:00
KX_SG_BoneParentNodeRelationship.cpp Merge of first part of changes from the apricot branch, especially 2008-09-04 20:51:28 +00:00
KX_SG_BoneParentNodeRelationship.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_SG_NodeRelationships.cpp Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_SG_NodeRelationships.h Added access for adjusting timeOffset value at runtime, used for apricot (Franky climbing walls) 2008-06-14 17:12:49 +00:00
KX_SoundActuator.cpp BGE patch: fix division by 0 error when sound sample cannot be loaded in sound actuator. 2008-08-28 08:13:58 +00:00
KX_SoundActuator.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_StateActuator.cpp [#17600] char* -> const char* 2008-09-20 11:08:35 +00:00
KX_StateActuator.h BGE patch: add state engine support in the logic bricks. 2008-06-22 14:23:57 +00:00
KX_SumoPhysicsController.cpp BGE patch: Optimization of bullet adaptation layer - part 1. 2008-07-21 12:37:27 +00:00
KX_SumoPhysicsController.h BGE patch: Optimization of bullet adaptation layer - part 1. 2008-07-21 12:37:27 +00:00
KX_TimeCategoryLogger.cpp Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_TimeCategoryLogger.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_TimeLogger.cpp Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_TimeLogger.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_TouchEventManager.cpp BGE fix bug #17430: BGE Collide/Touch Sensor interfearing with other unrelated sensor states. The bug was introduced in the recent logic optimization patch. It only affects collision and touch sensors. The bug is fixed by keeping track of registration count. 2008-08-05 16:23:33 +00:00
KX_TouchEventManager.h BGE patch: logic optimization part 2: remove inactive sensors from logic manager. 2008-07-30 17:41:47 +00:00
KX_TouchSensor.cpp [#17600] char* -> const char* 2008-09-20 11:08:35 +00:00
KX_TouchSensor.h BGE patch: logic optimization part 2: remove inactive sensors from logic manager. 2008-07-30 17:41:47 +00:00
KX_TrackToActuator.cpp [#17600] char* -> const char* 2008-09-20 11:08:35 +00:00
KX_TrackToActuator.h Python API get/setObject update for Actuators. (SetParent, AddObject, Camera and TrackTo) 2008-08-14 08:58:25 +00:00
KX_VehicleWrapper.cpp converted my gen_utils.h fix to PyObjectPlus.h 2008-09-06 14:13:31 +00:00
KX_VehicleWrapper.h exposed a few more tuning paramters 2006-02-21 07:08:23 +00:00
KX_VertexProxy.cpp Merge of first part of changes from the apricot branch, especially 2008-09-04 20:51:28 +00:00
KX_VertexProxy.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_VisibilityActuator.cpp [#17600] char* -> const char* 2008-09-20 11:08:35 +00:00
KX_VisibilityActuator.h BGE set visible actuator, option to set visibility recursively to make managing visibility for collections of objects a lot easier. 2008-09-05 16:22:14 +00:00
KX_WorldInfo.cpp Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_WorldInfo.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_WorldIpoController.cpp Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
KX_WorldIpoController.h Patch from GSR that a) fixes a whole bunch of GPL/BL license 2008-04-16 22:40:48 +00:00
Makefile Merge of first part of changes from the apricot branch, especially 2008-09-04 20:51:28 +00:00
SConscript Merge of first part of changes from the apricot branch, especially 2008-09-04 20:51:28 +00:00