diff options
Diffstat (limited to 'source/gameengine/Ketsji')
-rw-r--r-- | source/gameengine/Ketsji/KX_ConstraintWrapper.cpp | 7 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_ConstraintWrapper.h | 1 |
2 files changed, 8 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 diff --git a/source/gameengine/Ketsji/KX_ConstraintWrapper.h b/source/gameengine/Ketsji/KX_ConstraintWrapper.h index eafc45b5a70..b7124c76439 100644 --- a/source/gameengine/Ketsji/KX_ConstraintWrapper.h +++ b/source/gameengine/Ketsji/KX_ConstraintWrapper.h @@ -49,6 +49,7 @@ public: KX_PYMETHOD(KX_ConstraintWrapper,GetParam); static PyObject *pyattr_get_constraintId(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); + static PyObject *pyattr_get_constraintType(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); #endif private: |