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>2007-02-23 17:51:20 +0300
committerCampbell Barton <ideasman42@gmail.com>2007-02-23 17:51:20 +0300
commit086d51c822774ec68e95d9ab68679fb219ad8a12 (patch)
tree49591a038e005b8aaa7263668929d645dbfc8ca1 /source/blender/python/api2_2x/Armature.c
parent260af5f3c1590900353cce62657536bc96d3f53b (diff)
BPython API
* Added data.lib attributes to almost all data types, (except for Text3d and NLA) This is None or the path of the library as a string. * Main was giving a warning, Include Curve.h rather then CurNurb.h * Added Library.LinkedLibs(), returns a list of externaly linked libs.
Diffstat (limited to 'source/blender/python/api2_2x/Armature.c')
-rw-r--r--source/blender/python/api2_2x/Armature.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/Armature.c b/source/blender/python/api2_2x/Armature.c
index 8c3ed7506c9..f91c31b25db 100644
--- a/source/blender/python/api2_2x/Armature.c
+++ b/source/blender/python/api2_2x/Armature.c
@@ -960,6 +960,14 @@ AttributeError:
return EXPP_intError(PyExc_AttributeError, "%s%s",
sArmatureBadArgs, "Expects string");
}
+
+//------------------------Armature.name (getter)
+//Gets the name of the armature
+static PyObject *Armature_getLib(BPy_Armature *self, void *closure)
+{
+ return EXPP_GetIdLib((ID *)self->armature);
+}
+
//------------------------Armature.bones (getter)
//Gets the name of the armature
static PyObject *Armature_getBoneDict(BPy_Armature *self, void *closure)
@@ -998,6 +1006,8 @@ static PyMethodDef BPy_Armature_methods[] = {
static PyGetSetDef BPy_Armature_getset[] = {
{"name", (getter)Armature_getName, (setter)Armature_setName,
"The armature's name", NULL},
+ {"lib", (getter)Armature_getLib, (setter)NULL,
+ "The armature's library or None", NULL},
{"bones", (getter)Armature_getBoneDict, (setter)Armature_setBoneDict,
"The armature's Bone dictionary", NULL},
{"vertexGroups", (getter)Armature_getVertexGroups, (setter)Armature_setVertexGroups,