Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2006-12-17 05:16:29 +0300
committerCampbell Barton <ideasman42@gmail.com>2006-12-17 05:16:29 +0300
commit1041ad47195b78ed3c2005355143056579b9b69c (patch)
treec2d1986ecec571da564b660714cfba9b8aab0c57 /source/blender/python/api2_2x/Group.c
parent6acadfe9829fa5262c374e7183ac346255257545 (diff)
added fakeUser and users to more pytypes
Diffstat (limited to 'source/blender/python/api2_2x/Group.c')
-rwxr-xr-xsource/blender/python/api2_2x/Group.c21
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",