diff options
author | Campbell Barton <ideasman42@gmail.com> | 2006-12-17 05:16:29 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2006-12-17 05:16:29 +0300 |
commit | 1041ad47195b78ed3c2005355143056579b9b69c (patch) | |
tree | c2d1986ecec571da564b660714cfba9b8aab0c57 /source/blender/python/api2_2x/Group.c | |
parent | 6acadfe9829fa5262c374e7183ac346255257545 (diff) |
added fakeUser and users to more pytypes
Diffstat (limited to 'source/blender/python/api2_2x/Group.c')
-rwxr-xr-x | source/blender/python/api2_2x/Group.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/source/blender/python/api2_2x/Group.c b/source/blender/python/api2_2x/Group.c index f9e01b85f04..c3806f32091 100755 --- a/source/blender/python/api2_2x/Group.c +++ b/source/blender/python/api2_2x/Group.c @@ -250,13 +250,24 @@ static PyObject *Group_getName( BPy_Group * self, PyObject * args ) static PyObject *Group_getUsers( BPy_Group * self ) { + GROUP_DEL_CHECK_PY(self); return PyInt_FromLong( self->group->id.us ); } +static PyObject *Group_getFakeUser( BPy_Group * self ) +{ + GROUP_DEL_CHECK_PY(self); + if (self->group->id.flag & LIB_FAKEUSER) + Py_RETURN_TRUE; + else + Py_RETURN_FALSE; +} - - - +static int Group_setFakeUser( BPy_Group * self, PyObject * value ) +{ + GROUP_DEL_CHECK_PY(self); + return SetIdFakeUser(&self->group->id, value); +} @@ -302,6 +313,10 @@ static PyGetSetDef BPy_Group_getseters[] = { (getter)Group_getUsers, (setter)NULL, "Number of group users", NULL}, + {"fakeUser", + (getter)Group_getFakeUser, (setter)Group_setFakeUser, + "Number of group users", + NULL}, {"layers", (getter)Group_getLayers, (setter)Group_setLayers, "Number of group users", |