mirror of
https://github.com/bulletphysics/bullet3
synced 2024-12-15 06:00:12 +00:00
Parse physicsClientId before calling getPhysicsClient
This commit is contained in:
parent
c993175a58
commit
b4eca192fb
@ -6293,6 +6293,10 @@ static PyObject* pybullet_setCollisionFilterGroupMask(PyObject* self, PyObject*
|
||||
|
||||
static char* kwlist[] = {"bodyUniqueId", "linkIndexA", "collisionFilterGroup", "collisionFilterMask", "physicsClientId", NULL};
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, keywds, "iiii|i", kwlist,
|
||||
&bodyUniqueIdA, &linkIndexA, &collisionFilterGroup, &collisionFilterMask, &physicsClientId))
|
||||
return NULL;
|
||||
|
||||
sm = getPhysicsClient(physicsClientId);
|
||||
if (sm == 0)
|
||||
{
|
||||
@ -6300,10 +6304,6 @@ static PyObject* pybullet_setCollisionFilterGroupMask(PyObject* self, PyObject*
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, keywds, "iiii|i", kwlist,
|
||||
&bodyUniqueIdA, &linkIndexA, &collisionFilterGroup, &collisionFilterMask, &physicsClientId))
|
||||
return NULL;
|
||||
|
||||
commandHandle = b3CollisionFilterCommandInit(sm);
|
||||
b3SetCollisionFilterGroupMask(commandHandle, bodyUniqueIdA, linkIndexA, collisionFilterGroup, collisionFilterMask);
|
||||
|
||||
@ -6329,6 +6329,10 @@ static PyObject* pybullet_setCollisionFilterPair(PyObject* self, PyObject* args,
|
||||
|
||||
static char* kwlist[] = {"bodyUniqueIdA", "bodyUniqueIdB", "linkIndexA", "linkIndexB", "enableCollision", "physicsClientId", NULL};
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, keywds, "iiiii|i", kwlist,
|
||||
&bodyUniqueIdA, &bodyUniqueIdB, &linkIndexA, &linkIndexB, &enableCollision, &physicsClientId))
|
||||
return NULL;
|
||||
|
||||
sm = getPhysicsClient(physicsClientId);
|
||||
if (sm == 0)
|
||||
{
|
||||
@ -6336,10 +6340,6 @@ static PyObject* pybullet_setCollisionFilterPair(PyObject* self, PyObject* args,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, keywds, "iiiii|i", kwlist,
|
||||
&bodyUniqueIdA, &bodyUniqueIdB, &linkIndexA, &linkIndexB, &enableCollision, &physicsClientId))
|
||||
return NULL;
|
||||
|
||||
commandHandle = b3CollisionFilterCommandInit(sm);
|
||||
b3SetCollisionFilterPair(commandHandle, bodyUniqueIdA, bodyUniqueIdB, linkIndexA, linkIndexB, enableCollision);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user