Page MenuHome

py_nmfaceno_object_vec.txt

py_nmfaceno_object_vec.txt

Index: source/blender/python/api2_2x/NMesh.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/python/api2_2x/NMesh.c,v
retrieving revision 1.67
diff -u -p -r1.67 NMesh.c
--- source/blender/python/api2_2x/NMesh.c 22 Apr 2005 02:17:20 -0000 1.67
+++ source/blender/python/api2_2x/NMesh.c 24 Apr 2005 08:29:35 -0000
@@ -564,8 +564,7 @@ static PyObject *NMFace_getattr( PyObjec
CalcNormFloat( vco[0], vco[1], vco[2],
fNormal );
- return Py_BuildValue( "[f,f,f]", fNormal[0],
- fNormal[1], fNormal[2] );
+ return newVectorProxy( fNormal, 3 );
} else // EXPP_check_sequence_consistency failed
return EXPP_ReturnPyObjError( PyExc_AttributeError,
"this face does not contain a series of NMVerts" );
Index: source/blender/python/api2_2x/Object.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/python/api2_2x/Object.c,v
retrieving revision 1.112
diff -u -p -r1.112 Object.c
--- source/blender/python/api2_2x/Object.c 22 Apr 2005 18:05:56 -0000 1.112
+++ source/blender/python/api2_2x/Object.c 24 Apr 2005 08:29:36 -0000
@@ -2409,8 +2409,7 @@ static PyObject *Object_getAttr( BPy_Obj
if( StringEqual( name, "LocZ" ) )
return ( PyFloat_FromDouble( object->loc[2] ) );
if( StringEqual( name, "loc" ) )
- return ( Py_BuildValue( "fff", object->loc[0], object->loc[1],
- object->loc[2] ) );
+ return newVectorProxy( object->loc, 3 );
if( StringEqual( name, "dLocX" ) )
return ( PyFloat_FromDouble( object->dloc[0] ) );
if( StringEqual( name, "dLocY" ) )
@@ -2418,9 +2417,7 @@ static PyObject *Object_getAttr( BPy_Obj
if( StringEqual( name, "dLocZ" ) )
return ( PyFloat_FromDouble( object->dloc[2] ) );
if( StringEqual( name, "dloc" ) )
- return ( Py_BuildValue
- ( "fff", object->dloc[0], object->dloc[1],
- object->dloc[2] ) );
+ return newVectorProxy( object->dloc, 3 );
if( StringEqual( name, "RotX" ) )
return ( PyFloat_FromDouble( object->rot[0] ) );
if( StringEqual( name, "RotY" ) )
@@ -2428,8 +2425,7 @@ static PyObject *Object_getAttr( BPy_Obj
if( StringEqual( name, "RotZ" ) )
return ( PyFloat_FromDouble( object->rot[2] ) );
if( StringEqual( name, "rot" ) )
- return ( Py_BuildValue( "fff", object->rot[0], object->rot[1],
- object->rot[2] ) );
+ return newVectorProxy( object->rot, 3 );
if( StringEqual( name, "dRotX" ) )
return ( PyFloat_FromDouble( object->drot[0] ) );
if( StringEqual( name, "dRotY" ) )
@@ -2437,9 +2433,7 @@ static PyObject *Object_getAttr( BPy_Obj
if( StringEqual( name, "dRotZ" ) )
return ( PyFloat_FromDouble( object->drot[2] ) );
if( StringEqual( name, "drot" ) )
- return ( Py_BuildValue
- ( "fff", object->drot[0], object->drot[1],
- object->drot[2] ) );
+ return newVectorProxy( object->drot, 3 );
if( StringEqual( name, "SizeX" ) )
return ( PyFloat_FromDouble( object->size[0] ) );
if( StringEqual( name, "SizeY" ) )
@@ -2447,9 +2441,7 @@ static PyObject *Object_getAttr( BPy_Obj
if( StringEqual( name, "SizeZ" ) )
return ( PyFloat_FromDouble( object->size[2] ) );
if( StringEqual( name, "size" ) )
- return ( Py_BuildValue
- ( "fff", object->size[0], object->size[1],
- object->size[2] ) );
+ return newVectorProxy( object->size, 3 );
if( StringEqual( name, "dSizeX" ) )
return ( PyFloat_FromDouble( object->dsize[0] ) );
if( StringEqual( name, "dSizeY" ) )
@@ -2457,9 +2449,7 @@ static PyObject *Object_getAttr( BPy_Obj
if( StringEqual( name, "dSizeZ" ) )
return ( PyFloat_FromDouble( object->dsize[2] ) );
if( StringEqual( name, "dsize" ) )
- return ( Py_BuildValue
- ( "fff", object->dsize[0], object->dsize[1],
- object->dsize[2] ) );
+ return newVectorProxy( object->dsize, 3 );
if( strncmp( name, "Eff", 3 ) == 0 ) {
if( ( object->type == OB_IKA ) && ( object->data != NULL ) ) {
ika = object->data;
@@ -2484,11 +2474,11 @@ static PyObject *Object_getAttr( BPy_Obj
if( StringEqual( name, "layers" ) ) {
int layers, bit = 0, val = 0;
PyObject *item = NULL, *laylist = PyList_New( 0 );
-
+
if( !laylist )
return ( EXPP_ReturnPyObjError( PyExc_MemoryError,
"couldn't create pylist!" ) );
-
+
layers = object->lay;
while( bit < 20 ) {

File Metadata

Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
ef/8b/e70c9c8b42fe9977f1b19f02e90b

Event Timeline