[Bf-blender-cvs] [8f947ff] master: BGE: Constraint wrapper fix.

HG1 noreply at git.blender.org
Tue Jul 29 05:26:35 CEST 2014


Commit: 8f947ff34ab930c809e4af5673b23302bcce8190
Author: HG1
Date:   Tue Jul 29 00:20:59 2014 -0300
Branches: master
https://developer.blender.org/rB8f947ff34ab930c809e4af5673b23302bcce8190

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

===================================================================

M	doc/python_api/rst/bge_types/bge.types.KX_ConstraintWrapper.rst
M	source/gameengine/Ketsji/KX_PyConstraintBinding.cpp

===================================================================

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 f513f50..53bef12 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 e9843b0..ebf1b9e 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()) {




More information about the Bf-blender-cvs mailing list