mirror of
https://github.com/bulletphysics/bullet3
synced 2025-01-05 23:31:06 +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};
|
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);
|
sm = getPhysicsClient(physicsClientId);
|
||||||
if (sm == 0)
|
if (sm == 0)
|
||||||
{
|
{
|
||||||
@ -6300,10 +6304,6 @@ static PyObject* pybullet_setCollisionFilterGroupMask(PyObject* self, PyObject*
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!PyArg_ParseTupleAndKeywords(args, keywds, "iiii|i", kwlist,
|
|
||||||
&bodyUniqueIdA, &linkIndexA, &collisionFilterGroup, &collisionFilterMask, &physicsClientId))
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
commandHandle = b3CollisionFilterCommandInit(sm);
|
commandHandle = b3CollisionFilterCommandInit(sm);
|
||||||
b3SetCollisionFilterGroupMask(commandHandle, bodyUniqueIdA, linkIndexA, collisionFilterGroup, collisionFilterMask);
|
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};
|
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);
|
sm = getPhysicsClient(physicsClientId);
|
||||||
if (sm == 0)
|
if (sm == 0)
|
||||||
{
|
{
|
||||||
@ -6336,10 +6340,6 @@ static PyObject* pybullet_setCollisionFilterPair(PyObject* self, PyObject* args,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!PyArg_ParseTupleAndKeywords(args, keywds, "iiiii|i", kwlist,
|
|
||||||
&bodyUniqueIdA, &bodyUniqueIdB, &linkIndexA, &linkIndexB, &enableCollision, &physicsClientId))
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
commandHandle = b3CollisionFilterCommandInit(sm);
|
commandHandle = b3CollisionFilterCommandInit(sm);
|
||||||
b3SetCollisionFilterPair(commandHandle, bodyUniqueIdA, bodyUniqueIdB, linkIndexA, linkIndexB, enableCollision);
|
b3SetCollisionFilterPair(commandHandle, bodyUniqueIdA, bodyUniqueIdB, linkIndexA, linkIndexB, enableCollision);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user