From 8f947ff34ab930c809e4af5673b23302bcce8190 Mon Sep 17 00:00:00 2001 From: HG1 Date: Tue, 29 Jul 2014 00:20:59 -0300 Subject: [PATCH] BGE: Constraint wrapper fix. 1. This patch fix the KX_ConstraintWrapper documentation (radian instead of degrees). 2. It also adds the missing GENERIC_6DOF_CONSTRAINT constant. Reviewers: dfelinto Reviewed By: dfelinto Differential Revision: https://developer.blender.org/D672 --- .../rst/bge_types/bge.types.KX_ConstraintWrapper.rst | 6 +++--- source/gameengine/Ketsji/KX_PyConstraintBinding.cpp | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/python_api/rst/bge_types/bge.types.KX_ConstraintWrapper.rst b/doc/python_api/rst/bge_types/bge.types.KX_ConstraintWrapper.rst index f513f50ec9c..53bef120f7a 100644 --- a/doc/python_api/rst/bge_types/bge.types.KX_ConstraintWrapper.rst +++ b/doc/python_api/rst/bge_types/bge.types.KX_ConstraintWrapper.rst @@ -56,7 +56,7 @@ base class --- :class:`PyObjectPlus` * 1: Y axis position * 2: Z axis position - axis = 3..5 are relative constraint (Euler) angles in degrees + axis = 3..5 are relative constraint (Euler) angles in radians * 3: X axis angle * 4: Y axis angle * 5: Z axis angle @@ -86,7 +86,7 @@ base class --- :class:`PyObjectPlus` * 13: Y axis position * 14: Z axis position - axis = 15..17 are for angular springs on each of the degrees of freedom + axis = 15..17 are for angular springs on each of the angle of freedom in radians * 15: X axis angle * 16: Y axis angle * 17: Z axis angle @@ -113,7 +113,7 @@ base class --- :class:`PyObjectPlus` :return: position :rtype: float - axis = 3..5 are relative constraint (Euler) angles in degrees + axis = 3..5 are relative constraint (Euler) angles in radians * 3: X axis angle * 4: Y axis angle * 5: Z axis angle diff --git a/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp b/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp index e9843b0af5b..ebf1b9ec577 100644 --- a/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp +++ b/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp @@ -740,6 +740,7 @@ PyObject *initPythonConstraintBinding() KX_MACRO_addTypesToDict(d, ANGULAR_CONSTRAINT, PHY_ANGULAR_CONSTRAINT); KX_MACRO_addTypesToDict(d, CONETWIST_CONSTRAINT, PHY_CONE_TWIST_CONSTRAINT); KX_MACRO_addTypesToDict(d, VEHICLE_CONSTRAINT, PHY_VEHICLE_CONSTRAINT); + KX_MACRO_addTypesToDict(d, GENERIC_6DOF_CONSTRAINT, PHY_GENERIC_6DOF_CONSTRAINT); // Check for errors if (PyErr_Occurred()) {