[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [11959] trunk/blender/source/blender/ python/api2_2x/Object.c: last commit broke Object, c, also realized that calling getScale would break scriptlinks ( my fault from a while back :/)
Campbell Barton
cbarton at metavr.com
Fri Sep 7 10:04:15 CEST 2007
Revision: 11959
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11959
Author: campbellbarton
Date: 2007-09-07 10:04:15 +0200 (Fri, 07 Sep 2007)
Log Message:
-----------
last commit broke Object,c, also realized that calling getScale would break scriptlinks (my fault from a while back :/)
Modified Paths:
--------------
trunk/blender/source/blender/python/api2_2x/Object.c
Modified: trunk/blender/source/blender/python/api2_2x/Object.c
===================================================================
--- trunk/blender/source/blender/python/api2_2x/Object.c 2007-09-07 07:55:36 UTC (rev 11958)
+++ trunk/blender/source/blender/python/api2_2x/Object.c 2007-09-07 08:04:15 UTC (rev 11959)
@@ -1368,7 +1368,7 @@
static PyObject *Object_getSize( 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" );
@@ -1393,13 +1393,15 @@
tmat[2][2] );
disable_where_script( 0 );
} else if( BLI_streq( space, "localspace" ) ) { /* Localspace matrix */
- return Py_BuildValue( "fff",
+ attr = Py_BuildValue( "fff",
self->object->size[0],
self->object->size[1],
self->object->size[2] );
+ } else {
+ return EXPP_ReturnPyObjError( PyExc_ValueError,
+ "expected either nothing, 'localspace' (default) or 'worldspace'" );
}
- return EXPP_ReturnPyObjError( PyExc_ValueError,
- "expected either nothing, 'localspace' (default) or 'worldspace'" );
+ return attr;
}
static PyObject *Object_getTimeOffset( BPy_Object * self )
More information about the Bf-blender-cvs
mailing list