Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJorge Bernal <jbernalmartinez@gmail.com>2014-06-26 02:47:30 +0400
committerMitchell Stokes <mogurijin@gmail.com>2014-06-26 02:47:37 +0400
commit7d99a4ded9d3d24c24ea2d5bcc488469cf60fa4a (patch)
treef56a5cb74013a4e0520e668570e9fe9f6d1d4a6a /source/gameengine/Ketsji/KX_PythonInit.cpp
parent11d1fea2850dd4071268034b133c924ce6396df9 (diff)
BGE: New Mouse Actuator
Disclaimer: The author of this patch is Geoffrey Gollmer (gomer). I only updated the patch to the current git master status, reworked several parts to fit well with current coding style and applied several fixes. This actuator allows users to show/hide the mouse cursor using logic bricks, as well as control object rotation with a mouse in the BGE. The mouse rotation is flexible enough to allow any type of mouse look, as well as banking for flight controls. {F94520} {F91859} Blend file for testing Mouse actuator (with default parameters and crosshair): {F94920} Reviewers: moguri Reviewed By: moguri CC: gomer, lordodin Differential Revision: https://developer.blender.org/D559
Diffstat (limited to 'source/gameengine/Ketsji/KX_PythonInit.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_PythonInit.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp
index 913851bcc3f..5af4ab2a9b9 100644
--- a/source/gameengine/Ketsji/KX_PythonInit.cpp
+++ b/source/gameengine/Ketsji/KX_PythonInit.cpp
@@ -87,6 +87,7 @@ extern "C" {
#include "KX_SCA_DynamicActuator.h"
#include "KX_SteeringActuator.h"
#include "KX_NavMeshObject.h"
+#include "KX_MouseActuator.h"
#include "SCA_IInputDevice.h"
#include "SCA_PropertySensor.h"
@@ -1820,6 +1821,12 @@ PyObject *initGameLogic(KX_KetsjiEngine *engine, KX_Scene* scene) // quick hack
KX_MACRO_addTypesToDict(d, KX_ACTION_BLEND_BLEND, BL_Action::ACT_BLEND_BLEND);
KX_MACRO_addTypesToDict(d, KX_ACTION_BLEND_ADD, BL_Action::ACT_BLEND_ADD);
+ /* Mouse Actuator object axis*/
+ KX_MACRO_addTypesToDict(d, KX_ACT_MOUSE_OBJECT_AXIS_X, KX_MouseActuator::KX_ACT_MOUSE_OBJECT_AXIS_X);
+ KX_MACRO_addTypesToDict(d, KX_ACT_MOUSE_OBJECT_AXIS_Y, KX_MouseActuator::KX_ACT_MOUSE_OBJECT_AXIS_Y);
+ KX_MACRO_addTypesToDict(d, KX_ACT_MOUSE_OBJECT_AXIS_Z, KX_MouseActuator::KX_ACT_MOUSE_OBJECT_AXIS_Z);
+
+
// Check for errors
if (PyErr_Occurred())
{