diff options
author | Campbell Barton <ideasman42@gmail.com> | 2007-09-01 01:54:56 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2007-09-01 01:54:56 +0400 |
commit | 32fddfbe064e6f39d77039a3294bebb8c502f728 (patch) | |
tree | 4d6debf3d134771f6dd60e5d71c9d8ba5493812e /source/blender/python/api2_2x/Object.c | |
parent | 4cb953e60ede6ecff4af55679936ceb6126a2a0f (diff) |
my commit 11122 broke scriptlinks. was returning before re-enabling scriptlinks.
Bug [#6978] Scene script link doesn't work for Redraw event
made a script to automate building a range of revisions.
http://wiki.blender.org/index.php/User:Ideasman42#SVN_TimeWarp_Script
Diffstat (limited to 'source/blender/python/api2_2x/Object.c')
-rw-r--r-- | source/blender/python/api2_2x/Object.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/python/api2_2x/Object.c b/source/blender/python/api2_2x/Object.c index 73d30aa6ed3..0c2f9ed9634 100644 --- a/source/blender/python/api2_2x/Object.c +++ b/source/blender/python/api2_2x/Object.c @@ -1286,7 +1286,7 @@ static PyObject *Object_getIpo( BPy_Object * self ) static PyObject *Object_getLocation( BPy_Object * self, PyObject * args ) { char *space = "localspace"; /* default to local */ - + PyObject *attr; if( !PyArg_ParseTuple( args, "|s", &space ) ) return EXPP_ReturnPyObjError( PyExc_TypeError, "expected a string or nothing" ); @@ -1295,20 +1295,23 @@ static PyObject *Object_getLocation( BPy_Object * self, PyObject * args ) disable_where_script( 1 ); where_is_object( self->object ); - return Py_BuildValue( "fff", + attr = Py_BuildValue( "fff", self->object->obmat[3][0], self->object->obmat[3][1], self->object->obmat[3][2] ); disable_where_script( 0 ); } else if( BLI_streq( space, "localspace" ) ) { /* Localspace matrix */ - return Py_BuildValue( "fff", + attr = Py_BuildValue( "fff", self->object->loc[0], self->object->loc[1], self->object->loc[2] ); - } - return EXPP_ReturnPyObjError( PyExc_ValueError, + } else { + return EXPP_ReturnPyObjError( PyExc_ValueError, "expected either nothing, 'localspace' (default) or 'worldspace'" ); + } + + return attr; } static PyObject *Object_getMaterials( BPy_Object * self, PyObject * args ) |