diff options
author | HG1 <HG1_public@gmx.net> | 2014-07-18 09:50:51 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2014-07-18 09:52:23 +0400 |
commit | 841ade32bee1ce9128b98c11d0fc3ae6d74aaf86 (patch) | |
tree | 38d9e7671ad90d38184563563bdbddf4a045d392 /source/gameengine/Ketsji/KX_ConstraintWrapper.cpp | |
parent | 12a0cccfbf188425153514b3b821198cae558992 (diff) |
BGE: Add missing documentation and attribute constraint_type for ConstraintWrapper
1. Add attribute to get the constraint type.
2. Add missing documentation for getParent, setParam, constraint_id in bge.types.KX_ConstraintWrapper.rst.
3. Add missing documentation for GENERIC_6DOF_CONSTRAINT and flag bit in bge.constraints.rst.
4. Fix typo in CcdPhysicsEnvironment.cpp
Reviewers: moguri
Reviewed By: moguri
Differential Revision: https://developer.blender.org/D654
Diffstat (limited to 'source/gameengine/Ketsji/KX_ConstraintWrapper.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_ConstraintWrapper.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/gameengine/Ketsji/KX_ConstraintWrapper.cpp b/source/gameengine/Ketsji/KX_ConstraintWrapper.cpp index 793324fab75..29d92762285 100644 --- a/source/gameengine/Ketsji/KX_ConstraintWrapper.cpp +++ b/source/gameengine/Ketsji/KX_ConstraintWrapper.cpp @@ -114,6 +114,7 @@ PyMethodDef KX_ConstraintWrapper::Methods[] = { PyAttributeDef KX_ConstraintWrapper::Attributes[] = { KX_PYATTRIBUTE_RO_FUNCTION("constraint_id", KX_ConstraintWrapper, pyattr_get_constraintId), + KX_PYATTRIBUTE_RO_FUNCTION("constraint_type", KX_ConstraintWrapper, pyattr_get_constraintType), { NULL } //Sentinel }; @@ -123,4 +124,10 @@ PyObject *KX_ConstraintWrapper::pyattr_get_constraintId(void *self_v, const KX_P return self->PyGetConstraintId(); } +PyObject *KX_ConstraintWrapper::pyattr_get_constraintType(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) +{ + KX_ConstraintWrapper* self = static_cast<KX_ConstraintWrapper*>(self_v); + return PyLong_FromLong(self->m_constraintType); +} + #endif // WITH_PYTHON |