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-03-08 17:37:34 +0300
committerCampbell Barton <ideasman42@gmail.com>2007-03-08 17:37:34 +0300
commit5eaf9f90c1acc1b337a3fee38887f5db2a46ac81 (patch)
tree6c2608c7d77487761dfeefc0caf15be68dd64b0b /source/blender/python/api2_2x/Pose.c
parent51c16edabc18a13e91bee1a35cbe39eb1e911ea3 (diff)
BPython API
added a function - GenericLib_assignData for assigning blender data, to assign an ipo to a camera or world to a scene for instance. Using this function removed ~300 lines of code. also fixes user count error in some places that didnt check. also made it possible to clear the colorband by setting it to []
Diffstat (limited to 'source/blender/python/api2_2x/Pose.c')
-rw-r--r--source/blender/python/api2_2x/Pose.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/source/blender/python/api2_2x/Pose.c b/source/blender/python/api2_2x/Pose.c
index ea26c855477..364b37d3e67 100644
--- a/source/blender/python/api2_2x/Pose.c
+++ b/source/blender/python/api2_2x/Pose.c
@@ -962,14 +962,7 @@ static PyObject *PoseBone_getDisplayObject(BPy_PoseBone *self, void *closure)
//Sets the pose bones object used for display
static int PoseBone_setDisplayObject(BPy_PoseBone *self, PyObject *value, void *closure)
{
- if (value == Py_None) {
- self->posechannel->custom = NULL;
- } else if (BPy_Object_Check(value)) {
- self->posechannel->custom = Object_FromPyObject(value);
- } else {
- return EXPP_ReturnIntError(PyExc_AttributeError, "can only assign a Blender Object or None");
- }
- return 0;
+ return GenericLib_assignData(value, (void **) &self->posechannel->custom, 0, 0, ID_OB, 0);
}
//------------------------PoseBone.hasIK (getter)