Blender Git Commit Log

Git Commits -> Revision 2050ecc

Revision 2050ecc by Porteries Tristan (master)
April 10, 2016, 21:57 (GMT)
BGE: Fix T48071: Global logic manager

Previously the logic manager was used as a global variable for SCA_ILogicBrick::m_sCurrentLogicManager,
this request to always update it before run any python script and allow call function like
ConvertPythonTo[GameObject/Mesh]. The bug showed in T48071 is that as exepted the global
m_sCurrentLogicManager is not updated with the proper scene logic manager.
Instead of trying to fix it by updating the logic manager everywhere and wait next bug report to add
a similar line. The following patch propose a different way:
- Every logic brick now contain its logic manager to SCA_ILogicBrick::m_logicManager, this value is
set and get by SCA_ILogicBrick::[Set/Get]LogicManager, It's initialized from blender conversion and
scene merging.
- Function ConvertPythonTo[GameObject/mesh] now take as first argument the logic manager to find name
coresponding object or mesh. Only ConvertPythonToCamera doesn't do that because it uses the
KX_Scene::FindCamera function.

Reviewers: moguri

Differential Revision: https://developer.blender.org/D1913

Commit Details:

Full Hash: 2050ecc307de9159b50c7f9798e47a366f505f2e
Parent Commit: 3a80d5e
Lines Changed: +71, -52

25 Modified Paths:

/source/gameengine/Converter/BL_ActionActuator.cpp (+1, -1) (Diff)
/source/gameengine/Converter/BL_ArmatureActuator.cpp (+1, -1) (Diff)
/source/gameengine/Converter/BL_ArmatureConstraint.cpp (+4, -2) (Diff)
/source/gameengine/Converter/BL_ShapeActionActuator.cpp (+1, -1) (Diff)
/source/gameengine/Converter/KX_ConvertActuators.cpp (+1, -0) (Diff)
/source/gameengine/Converter/KX_ConvertControllers.cpp (+1, -0) (Diff)
/source/gameengine/Converter/KX_ConvertSensors.cpp (+1, -0) (Diff)
/source/gameengine/GameLogic/SCA_ILogicBrick.cpp (+11, -2) (Diff)
/source/gameengine/GameLogic/SCA_ILogicBrick.h (+4, -3) (Diff)
/source/gameengine/GameLogic/SCA_PythonController.cpp (+3, -4) (Diff)
/source/gameengine/Ketsji/KX_Camera.cpp (+1, -1) (Diff)
/source/gameengine/Ketsji/KX_CameraActuator.cpp (+1, -1) (Diff)
/source/gameengine/Ketsji/KX_GameObject.cpp (+20, -21) (Diff)
/source/gameengine/Ketsji/KX_GameObject.h (+1, -1) (Diff)
/source/gameengine/Ketsji/KX_MeshProxy.cpp (+4, -2) (Diff)
/source/gameengine/Ketsji/KX_MeshProxy.h (+2, -1) (Diff)
/source/gameengine/Ketsji/KX_ObjectActuator.cpp (+1, -1) (Diff)
/source/gameengine/Ketsji/KX_ParentActuator.cpp (+1, -1) (Diff)
/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp (+2, -1) (Diff)
/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp (+1, -1) (Diff)
/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.cpp (+1, -1) (Diff)
/source/gameengine/Ketsji/KX_Scene.cpp (+3, -2) (Diff)
/source/gameengine/Ketsji/KX_SteeringActuator.cpp (+2, -2) (Diff)
/source/gameengine/Ketsji/KX_TrackToActuator.cpp (+1, -1) (Diff)
/source/gameengine/Ketsji/KX_VehicleWrapper.cpp (+2, -1) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021