From 89b0b0516e9e46284f445a33be1887af499c251f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 22 Nov 2012 05:33:05 +0000 Subject: [PATCH] bge camera axix actuator was undocumented and python had incorrect limits on this attribute. --- doc/python_api/rst/bge.types.rst | 20 ++++++++++++++++++- .../gameengine/Ketsji/KX_CameraActuator.cpp | 4 ++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/doc/python_api/rst/bge.types.rst b/doc/python_api/rst/bge.types.rst index 72cc6a5f154..c0a5eeb55d1 100644 --- a/doc/python_api/rst/bge.types.rst +++ b/doc/python_api/rst/bge.types.rst @@ -205,6 +205,18 @@ Types :type: boolean + .. attribute:: pos_ticks + + The number of ticks since the last positive pulse (read-only). + + :type: int + + .. attribute:: neg_ticks + + The number of ticks since the last negative pulse (read-only). + + :type: int + .. attribute:: status The status of the sensor (read-only): can be one of :ref:`these constants`. @@ -743,7 +755,13 @@ Types strength of of the camera following movement. :type: float - + + .. attribute:: axis + + The camera axis (0, 1, 2) for positive ``XYZ``, (3, 4, 5) for negative ``XYZ``. + + :type: int + .. attribute:: min minimum distance to the target object maintained by the actuator. diff --git a/source/gameengine/Ketsji/KX_CameraActuator.cpp b/source/gameengine/Ketsji/KX_CameraActuator.cpp index a37b1b0c396..59ca0d8d326 100644 --- a/source/gameengine/Ketsji/KX_CameraActuator.cpp +++ b/source/gameengine/Ketsji/KX_CameraActuator.cpp @@ -388,8 +388,8 @@ PyAttributeDef KX_CameraActuator::Attributes[] = { KX_PYATTRIBUTE_FLOAT_RW("min",-FLT_MAX,FLT_MAX,KX_CameraActuator,m_minHeight), KX_PYATTRIBUTE_FLOAT_RW("max",-FLT_MAX,FLT_MAX,KX_CameraActuator,m_maxHeight), KX_PYATTRIBUTE_FLOAT_RW("height",-FLT_MAX,FLT_MAX,KX_CameraActuator,m_height), - KX_PYATTRIBUTE_SHORT_RW("axis", 0, 3, true, KX_CameraActuator,m_axis), - KX_PYATTRIBUTE_RW_FUNCTION("object", KX_CameraActuator, pyattr_get_object, pyattr_set_object), + KX_PYATTRIBUTE_SHORT_RW("axis", 0, 5, true, KX_CameraActuator, m_axis), + KX_PYATTRIBUTE_RW_FUNCTION("object", KX_CameraActuator, pyattr_get_object, pyattr_set_object), KX_PYATTRIBUTE_FLOAT_RW("damping",0.f,10.f,KX_CameraActuator,m_damping), {NULL} };