[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54095] branches/soc-2008-mxcurioni/source /blender/freestyle/intern/python/BPy_StrokeAttribute.cpp: Fix for no copy constructor in the Python wrapper of StrokeAttribute.
Tamito Kajiyama
rd6t-kjym at asahi-net.or.jp
Fri Jan 25 08:31:35 CET 2013
Revision: 54095
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54095
Author: kjym3
Date: 2013-01-25 07:31:29 +0000 (Fri, 25 Jan 2013)
Log Message:
-----------
Fix for no copy constructor in the Python wrapper of StrokeAttribute.
Modified Paths:
--------------
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp 2013-01-25 06:26:38 UTC (rev 54094)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_StrokeAttribute.cpp 2013-01-25 07:31:29 UTC (rev 54095)
@@ -73,30 +73,34 @@
PyObject *obj1 = 0, *obj2 = 0 , *obj3 = 0, *obj4 = 0, *obj5 = 0 , *obj6 = 0;
- if (! PyArg_ParseTuple(args, "|OOOOOO", &obj1, &obj2, &obj3, &obj4, &obj5, &obj6) )
- return -1;
+ if (! PyArg_ParseTuple(args, "|OOOOOO", &obj1, &obj2, &obj3, &obj4, &obj5, &obj6) )
+ return -1;
- if( !obj1 || !obj2 || !obj3 ){
-
+ if ( !obj1 ) {
+
self->sa = new StrokeAttribute();
-
- } else if( BPy_StrokeAttribute_Check(obj1) &&
+
+ } else if ( BPy_StrokeAttribute_Check(obj1) && !obj2 ) {
+
+ self->sa = new StrokeAttribute( *( ((BPy_StrokeAttribute *) obj1)->sa ) );
+
+ } else if ( BPy_StrokeAttribute_Check(obj1) &&
BPy_StrokeAttribute_Check(obj2) &&
- PyFloat_Check(obj3) ) {
-
- self->sa = new StrokeAttribute( *( ((BPy_StrokeAttribute *) obj1)->sa ),
- *( ((BPy_StrokeAttribute *) obj2)->sa ),
- PyFloat_AsDouble( obj3 ) );
-
- } else if( obj4 && obj5 && obj6 ) {
-
- self->sa = new StrokeAttribute( PyFloat_AsDouble( obj1 ),
- PyFloat_AsDouble( obj2 ),
- PyFloat_AsDouble( obj3 ),
- PyFloat_AsDouble( obj4 ),
- PyFloat_AsDouble( obj5 ),
- PyFloat_AsDouble( obj6 ) );
+ PyFloat_Check(obj3) && !obj4 ) {
+ self->sa = new StrokeAttribute( *( ((BPy_StrokeAttribute *) obj1)->sa ),
+ *( ((BPy_StrokeAttribute *) obj2)->sa ),
+ PyFloat_AsDouble( obj3 ) );
+
+ } else if ( obj6 ) {
+
+ self->sa = new StrokeAttribute( PyFloat_AsDouble( obj1 ),
+ PyFloat_AsDouble( obj2 ),
+ PyFloat_AsDouble( obj3 ),
+ PyFloat_AsDouble( obj4 ),
+ PyFloat_AsDouble( obj5 ),
+ PyFloat_AsDouble( obj6 ) );
+
} else {
PyErr_SetString(PyExc_TypeError, "invalid arguments");
return -1;
More information about the Bf-blender-cvs
mailing list