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/Armature.c
parent6acadfe9829fa5262c374e7183ac346255257545 (diff)
added fakeUser and users to more pytypes
Diffstat (limited to 'source/blender/python/api2_2x/Armature.c')
-rw-r--r--source/blender/python/api2_2x/Armature.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/Armature.c b/source/blender/python/api2_2x/Armature.c
index fb8200c6c8e..38109cdce5b 100644
--- a/source/blender/python/api2_2x/Armature.c
+++ b/source/blender/python/api2_2x/Armature.c
@@ -607,6 +607,29 @@ AttributeError:
return EXPP_ReturnIntError( PyExc_TypeError,
"expected a list of integers" );
}
+
+//------------------------Armature.users (getter)
+static PyObject *Armature_getUsers( BPy_Armature * self )
+{
+ return PyInt_FromLong( self->armature->id.us );
+}
+
+
+//------------------------Armature.fakeUser (getter)
+static PyObject *Armature_getFakeUser( BPy_Armature * self )
+{
+ if (self->armature->id.flag & LIB_FAKEUSER)
+ Py_RETURN_TRUE;
+ else
+ Py_RETURN_FALSE;
+}
+//------------------------Armature.fakeUser (setter)
+static int Armature_setFakeUser( BPy_Armature * self, PyObject * value )
+{
+ return SetIdFakeUser(&self->armature->id, value);
+}
+
+
//------------------------Armature.mirrorEdit (getter)
static PyObject *Armature_getMirrorEdit(BPy_Armature *self, void *closure)
{
@@ -1001,6 +1024,10 @@ static PyGetSetDef BPy_Armature_getset[] = {
"Adds temporal IK chains while grabbing bones", NULL},
{"layers", (getter)Armature_getLayers, (setter)Armature_setLayers,
"List of layers for the armature", NULL},
+ {"users", (getter)Armature_getUsers, (setter)NULL,
+ "The number of object users", NULL},
+ {"fakeUser", (getter)Armature_getFakeUser, (setter)Armature_setFakeUser,
+ "The fake user status of this object", NULL},
{NULL, NULL, NULL, NULL, NULL}
};
//------------------------tp_new