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-04-25 04:37:19 +0400
committerCampbell Barton <ideasman42@gmail.com>2007-04-25 04:37:19 +0400
commit0c7e145dcedaf3e22abaead61c1b1cb431a7da0a (patch)
treee5a63e7207912ba5e03b124834e52c4e7b2239f2 /source/blender/python/api2_2x/Object.c
parent77f08ddc12870b90064273fa314d462ccdd473ba (diff)
Object.c - made object action writable
gen_library - fixed bug, wasnt adjusting user counts properly. bpy_data.c - added default new names for new data
Diffstat (limited to 'source/blender/python/api2_2x/Object.c')
-rw-r--r--source/blender/python/api2_2x/Object.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/source/blender/python/api2_2x/Object.c b/source/blender/python/api2_2x/Object.c
index 29478de74ff..810748e21a3 100644
--- a/source/blender/python/api2_2x/Object.c
+++ b/source/blender/python/api2_2x/Object.c
@@ -1167,6 +1167,11 @@ static PyObject *Object_getAction( BPy_Object * self )
Py_RETURN_NONE;
}
+static int Object_setAction( BPy_Object * self, PyObject * value )
+{
+ return GenericLib_assignData(value, (void **) &self->object->action, 0, 1, ID_AC, 0);
+}
+
static PyObject *Object_evaluatePose(BPy_Object *self, PyObject *args)
{
int frame = 1;
@@ -1326,9 +1331,7 @@ static PyObject *Object_getMaterials( BPy_Object * self, PyObject * args )
static PyObject *Object_getParent( BPy_Object * self )
{
- if( self->object->parent )
- return Object_CreatePyObject( self->object->parent );
- Py_RETURN_NONE;
+ return Object_CreatePyObject( self->object->parent );
}
static PyObject *Object_getParentBoneName( BPy_Object * self )
@@ -1404,9 +1407,7 @@ static PyObject *Object_getTimeOffset( BPy_Object * self )
static PyObject *Object_getTracked( BPy_Object * self )
{
- if( self->object->track )
- return Object_CreatePyObject( self->object->track );
- Py_RETURN_NONE;
+ return Object_CreatePyObject( self->object->track );
}
static PyObject *Object_getType( BPy_Object * self )
@@ -4746,7 +4747,7 @@ static PyGetSetDef BPy_Object_getseters[] = {
"The bounding box of this object",
NULL},
{"action",
- (getter)Object_getAction, (setter)NULL,
+ (getter)Object_getAction, (setter)Object_setAction,
"The action associated with this object (if defined)",
NULL},
{"game_properties",