blender/source/gameengine/Ketsji
Campbell Barton b5b24ee521 BGE Python sys.path for the blenderplayer and blender
sys.path is the search path for python modules. This is useful so people making games can put all their scripts in a folder and be sure they will always load into the BGE.

for each blend file a scripts directory is added to the path
 /home/me/foo.blend
will look for modules in...
 /home/me/scripts/*.py 

It could also default to look for modules in the same directory as the blend file but I think this is messy.
Added a note in the tooltip about //scripts so its not such a hidden feature.

This works by storing the original sys.path, then adding the paths for the blendfile and all its libs,
when a new blendfile is loaded, the original sys.path is restored before adding the blendfiles paths again so the sys.path wont get junk in it.

One problem with this - when using linked libs the module names must be unique else it will load the wrong module for one of the controllers.

also fixed 2 bugs
- sys.path in the blenderplayer was growing by 1 for every file load in blenderplayer
- the relative path (gp_GamePythonPath), wasnt being set when loading files in the blenderlayer (as I wrongly said in the last commit).
2009-04-30 08:01:31 +00:00
..
KXNetwork ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing) 2009-04-29 16:54:45 +00:00
BL_BlenderShader.cpp Fix for bug #18423: BGE lights in overlay scene also affected 2009-03-24 15:45:08 +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 BGE: speed up mesh conversion by avoiding allocation/deallocation of material object on each face. The speed up is minor on optimized builds but considerable on less optimized builds, good for debugging large scene. 2009-04-29 10:06:38 +00:00
BL_Material.h BGE: speed up mesh conversion by avoiding allocation/deallocation of material object on each face. The speed up is minor on optimized builds but considerable on less optimized builds, good for debugging large scene. 2009-04-29 10:06:38 +00:00
BL_Shader.cpp ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing) 2009-04-29 16:54:45 +00:00
BL_Shader.h BGE Python API 2009-04-20 23:17:52 +00:00
BL_Texture.cpp BGE Python API 2009-02-19 13:42:07 +00:00
BL_Texture.h Preparation to VideoTexture: everything but the VideoTexture module itself. 2008-10-31 21:06:48 +00:00
CMakeLists.txt Blender Python API 2009-04-21 09:44:29 +00:00
KX_BlenderMaterial.cpp ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing) 2009-04-29 16:54:45 +00:00
KX_BlenderMaterial.h BGE: speed up mesh conversion by avoiding allocation/deallocation of material object on each face. The speed up is minor on optimized builds but considerable on less optimized builds, good for debugging large scene. 2009-04-29 10:06:38 +00:00
KX_BulletPhysicsController.cpp BGE: reenable object activation for static object, otherwise their physic shape is not updated when they move due to parent relation. 2009-04-28 18:56:48 +00:00
KX_BulletPhysicsController.h BGE bug #18624: Collision detection fails on parented objects. Partial fix, parented shape now moves with the parent but still the parent near detector detects the child only in the zone where it was parented. 2009-04-27 16:40:26 +00:00
KX_Camera.cpp ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing) 2009-04-29 16:54:45 +00:00
KX_Camera.h BGE PyAPI 2009-04-28 13:11:56 +00:00
KX_CameraActuator.cpp ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing) 2009-04-29 16:54:45 +00:00
KX_CameraActuator.h BGE Python API 2009-04-20 23:17:52 +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 ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing) 2009-04-29 16:54:45 +00:00
KX_CDActuator.h BGE Python API 2009-04-20 23:17:52 +00:00
KX_ClientObjectInfo.h Building the game engine with Solid/Sumo is now optional for scons using WITH_BF_SOLID. 2009-02-25 12:07:51 +00:00
KX_ConstraintActuator.cpp ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing) 2009-04-29 16:54:45 +00:00
KX_ConstraintActuator.h BGE C++ API 2009-04-22 14:42:00 +00:00
KX_ConstraintWrapper.cpp ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing) 2009-04-29 16:54:45 +00:00
KX_ConstraintWrapper.h BGE Python API 2009-04-20 23:17:52 +00:00
KX_ConvertPhysicsObject.h BGE: Add soft body welding parameter to the Advanced Settings panel. The values are very small so I chose to use logarithmic scale. Should be fine, it's an advanced setting after all. 2009-04-27 16:44:02 +00:00
KX_ConvertPhysicsObjects.cpp BGE: Add soft body welding parameter to the Advanced Settings panel. The values are very small so I chose to use logarithmic scale. Should be fine, it's an advanced setting after all. 2009-04-27 16:44:02 +00:00
KX_Dome.cpp BGE Dome update. Spurious black seams (finally) fixed. 2009-04-30 02:41:07 +00:00
KX_Dome.h Fix for part of bug #18496: issue with light state switching 2009-04-23 13:30:34 +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 ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing) 2009-04-29 16:54:45 +00:00
KX_GameActuator.h BGE Python API 2009-04-20 23:17:52 +00:00
KX_GameObject.cpp ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing) 2009-04-29 16:54:45 +00:00
KX_GameObject.h [#18606] Writing to KX_GameObject.orientation causes crash 2009-04-25 07:17:36 +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 BGE patch: dynamically update the coumpound parent shape when parenting to a compound object. 2009-01-13 22:59:18 +00:00
KX_IPhysicsController.h BGE Physics 2009-04-14 12:34:39 +00:00
KX_IPO_SGController.cpp remove warnings for the BGE 2009-02-25 03:26:02 +00:00
KX_IPO_SGController.h BGE bug #17657 fixed: dRotY doesn't work properly after 90 degrees rotation. 2008-09-23 20:07:15 +00:00
KX_IpoActuator.cpp ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing) 2009-04-29 16:54:45 +00:00
KX_IpoActuator.h BGE C++ API 2009-04-22 14:42:00 +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 BGE 2dFilters: Revert of part of own commit [rev. 19687] 2009-04-30 03:46:31 +00:00
KX_KetsjiEngine.h Patch #18462: Fisheye (Dome) and Spherical Panoramic mode in BGE. 2009-04-08 15:06:20 +00:00
KX_Light.cpp ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing) 2009-04-29 16:54:45 +00:00
KX_Light.h Patch from Mitchell Stokes for KX_Light to use attrdef's 2009-04-21 23:15:18 +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 ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing) 2009-04-29 16:54:45 +00:00
KX_MeshProxy.h BGE: some more cleanup, remove useless ReplicaSetName(), move code to ProcessReplica. 2009-04-22 16:58:04 +00:00
KX_MotionState.cpp gcc wouldn't compile using a reference 2009-04-07 23:21:30 +00:00
KX_MotionState.h BGE Scenegraph and View frustrum culling improvement. 2009-04-07 22:14:06 +00:00
KX_MouseFocusSensor.cpp ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing) 2009-04-29 16:54:45 +00:00
KX_MouseFocusSensor.h BGE C++ API 2009-04-22 14:42:00 +00:00
KX_NearSensor.cpp ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing) 2009-04-29 16:54:45 +00:00
KX_NearSensor.h BGE: some more cleanup, implement proper GetReplica/ProcessReplica workflow for touch/near/radar sensor. Remove duplicated code. 2009-04-22 18:20:41 +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 ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing) 2009-04-29 16:54:45 +00:00
KX_ObjectActuator.h BGE Python API 2009-04-20 23:17:52 +00:00
KX_OdePhysicsController.cpp BGE patch: dynamically update the coumpound parent shape when parenting to a compound object. 2009-01-13 22:59:18 +00:00
KX_OdePhysicsController.h BGE: Keep Sumo and ODE in sync with Bullet at API level, fix a compilation problem in MSVC. 2009-04-14 17:22:14 +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 ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing) 2009-04-29 16:54:45 +00:00
KX_ParentActuator.h BGE Python API 2009-04-20 23:17:52 +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 ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing) 2009-04-29 16:54:45 +00:00
KX_PhysicsObjectWrapper.h BGE Python API 2009-04-20 23:17:52 +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 ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing) 2009-04-29 16:54:45 +00:00
KX_PolygonMaterial.h BGE: speed up mesh conversion by avoiding allocation/deallocation of material object on each face. The speed up is minor on optimized builds but considerable on less optimized builds, good for debugging large scene. 2009-04-29 10:06:38 +00:00
KX_PolyProxy.cpp ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing) 2009-04-29 16:54:45 +00:00
KX_PolyProxy.h BGE: some more cleanup, remove useless ReplicaSetName(), move code to ProcessReplica. 2009-04-22 16:58:04 +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 python modules in the game engine could point to builtin modules like GameLogic that was cleared. 2009-04-29 23:39:27 +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 [#18606] Writing to KX_GameObject.orientation causes crash 2009-04-25 07:17:36 +00:00
KX_PyMath.h BGE Python API 2009-04-20 09:13:59 +00:00
KX_PythonInit.cpp BGE Python sys.path for the blenderplayer and blender 2009-04-30 08:01:31 +00:00
KX_PythonInit.h BGE Python API 2009-04-20 09:13:59 +00:00
KX_PythonInitTypes.cpp BGE Python API 2009-04-19 17:29:07 +00:00
KX_PythonInitTypes.h SVN maintenance. 2009-04-13 19:33:22 +00:00
KX_RadarSensor.cpp ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing) 2009-04-29 16:54:45 +00:00
KX_RadarSensor.h BGE: some more cleanup, implement proper GetReplica/ProcessReplica workflow for touch/near/radar sensor. Remove duplicated code. 2009-04-22 18:20:41 +00:00
KX_RayCast.cpp BGE Bugfixes (mostly in the py api) 2009-04-05 14:01:49 +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 ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing) 2009-04-29 16:54:45 +00:00
KX_RaySensor.h BGE Python API 2009-04-20 23:17:52 +00:00
KX_SCA_AddObjectActuator.cpp ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing) 2009-04-29 16:54:45 +00:00
KX_SCA_AddObjectActuator.h BGE Python API 2009-04-20 23:17:52 +00:00
KX_SCA_DynamicActuator.cpp ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing) 2009-04-29 16:54:45 +00:00
KX_SCA_DynamicActuator.h BGE Python API 2009-04-20 23:17:52 +00:00
KX_SCA_EndObjectActuator.cpp ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing) 2009-04-29 16:54:45 +00:00
KX_SCA_EndObjectActuator.h BGE Python API 2009-04-20 23:17:52 +00:00
KX_SCA_ReplaceMeshActuator.cpp ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing) 2009-04-29 16:54:45 +00:00
KX_SCA_ReplaceMeshActuator.h BGE Python API 2009-04-20 23:17:52 +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 ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing) 2009-04-29 16:54:45 +00:00
KX_Scene.h BGE PyAPI 2009-04-28 13:11:56 +00:00
KX_SceneActuator.cpp ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing) 2009-04-29 16:54:45 +00:00
KX_SceneActuator.h BGE Python API 2009-04-20 23:17:52 +00:00
KX_SG_BoneParentNodeRelationship.cpp BGE Scenegraph and View frustrum culling improvement. 2009-04-07 22:14:06 +00:00
KX_SG_BoneParentNodeRelationship.h BGE Scenegraph and View frustrum culling improvement. 2009-04-07 22:14:06 +00:00
KX_SG_NodeRelationships.cpp BGE: slow parent was causing scaling distortion, now use correct quaternion interpolation. 2009-04-16 20:13:13 +00:00
KX_SG_NodeRelationships.h BGE Scenegraph and View frustrum culling improvement. 2009-04-07 22:14:06 +00:00
KX_SoundActuator.cpp ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing) 2009-04-29 16:54:45 +00:00
KX_SoundActuator.h BGE Python API 2009-04-20 23:17:52 +00:00
KX_StateActuator.cpp ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing) 2009-04-29 16:54:45 +00:00
KX_StateActuator.h BGE Python API 2009-04-20 23:17:52 +00:00
KX_SumoPhysicsController.cpp BGE patch #18051: add localInertia attribute to GameObject. 2009-04-08 16:25:00 +00:00
KX_SumoPhysicsController.h BGE: Keep Sumo and ODE in sync with Bullet at API level, fix a compilation problem in MSVC. 2009-04-14 17:22:14 +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 ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing) 2009-04-29 16:54:45 +00:00
KX_TouchSensor.h BGE: some more cleanup, implement proper GetReplica/ProcessReplica workflow for touch/near/radar sensor. Remove duplicated code. 2009-04-22 18:20:41 +00:00
KX_TrackToActuator.cpp ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing) 2009-04-29 16:54:45 +00:00
KX_TrackToActuator.h BGE C++ API 2009-04-22 14:42:00 +00:00
KX_VehicleWrapper.cpp ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing) 2009-04-29 16:54:45 +00:00
KX_VehicleWrapper.h BGE Python API 2009-04-20 23:17:52 +00:00
KX_VertexProxy.cpp ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing) 2009-04-29 16:54:45 +00:00
KX_VertexProxy.h BGE: some more cleanup, remove useless ReplicaSetName(), move code to ProcessReplica. 2009-04-22 16:58:04 +00:00
KX_VisibilityActuator.cpp ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing) 2009-04-29 16:54:45 +00:00
KX_VisibilityActuator.h BGE Python API 2009-04-20 23:17:52 +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 Blender Python API 2009-04-21 09:44:29 +00:00