Get body name from getBodyInfo.

This commit is contained in:
yunfeibai
2017-03-29 14:56:05 -07:00
parent 0a552c3ba1
commit de3f91b64e
6 changed files with 13 additions and 2 deletions

View File

@@ -1711,8 +1711,9 @@ static PyObject* pybullet_getBodyInfo(PyObject* self, PyObject* args, PyObject*
struct b3BodyInfo info;
if (b3GetBodyInfo(sm, bodyUniqueId, &info))
{
PyObject* pyListJointInfo = PyTuple_New(1);
PyObject* pyListJointInfo = PyTuple_New(2);
PyTuple_SetItem(pyListJointInfo, 0, PyString_FromString(info.m_baseName));
PyTuple_SetItem(pyListJointInfo, 1, PyString_FromString(info.m_bodyName));
return pyListJointInfo;
}
}