[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [19283] branches/soc-2008-mxcurioni/source /blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp: Fixed StrokeVertex::setPoint() to accept a Blender Vector object as the argument.

Tamito Kajiyama rd6t-kjym at asahi-net.or.jp
Sat Mar 14 14:06:09 CET 2009


Revision: 19283
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=19283
Author:   kjym3
Date:     2009-03-14 14:06:09 +0100 (Sat, 14 Mar 2009)

Log Message:
-----------
Fixed StrokeVertex::setPoint() to accept a Blender Vector object as the argument.
Now this method accepts 2D coordinates in the following three forms:
a) Python list of 2 real numbers: setPoint([x, y])
b) Blender Vector of 2 elements: setPoint(Vector(x, y))
c) 2 real numbers: setPoint(x, y)

Modified Paths:
--------------
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp

Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp	2009-03-14 09:06:31 UTC (rev 19282)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/UnaryPredicate1D/BPy_ShapeUP1D.cpp	2009-03-14 13:06:09 UTC (rev 19283)
@@ -100,7 +100,7 @@
 {
 	unsigned u1, u2 = 0;
 
-	if( !PyArg_ParseTuple(args, "II", &u1, &u2) ) {
+	if( !PyArg_ParseTuple(args, "I|I", &u1, &u2) ) {
 		cout << "ERROR: ShapeUP1D___init__" << endl;		
 		return -1;
 	}





More information about the Bf-blender-cvs mailing list