Page MenuHome

curve-weights.patch

Authored By
Todd Koeckeritz (zaz)
Nov 13 2013, 1:02 PM
Size
1 KB
Subscribers
None

curve-weights.patch

Index: source/blender/python/api2_2x/Curve.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/python/api2_2x/Curve.c,v
retrieving revision 1.38
diff -u -r1.38 Curve.c
--- source/blender/python/api2_2x/Curve.c 29 Nov 2005 01:35:45 -0000 1.38
+++ source/blender/python/api2_2x/Curve.c 5 Dec 2005 02:31:22 -0000
@@ -186,10 +186,10 @@
METH_VARARGS, "(int) - Sets extent 2 of the bevel "},
{"getControlPoint", ( PyCFunction ) Curve_getControlPoint,
METH_VARARGS, "(int numcurve,int numpoint) -\
-Gets a control point.Depending upon the curve type, returne a list of 4 or 9 floats"},
+Gets a control point.Depending upon the curve type, returne a list of 4 or 10 floats"},
{"setControlPoint", ( PyCFunction ) Curve_setControlPoint,
METH_VARARGS, "(int numcurve,int numpoint,float x,float y,float z,\
-float w)(nurbs) or (int numcurve,int numpoint,float x1,...,x9(bezier)\
+float w)(nurbs) or (int numcurve,int numpoint,float x1,...,x9,w(bezier)\
Sets a control point "},
{"getLoc", ( PyCFunction ) Curve_getLoc,
METH_NOARGS, "() - Gets Location of the curve (a 3-tuple) "},
@@ -823,13 +823,17 @@
(float)PyFloat_AsDouble( PyList_GetItem
( listargs, i ) );
- if( ptrnurb->bezt )
+ if( ptrnurb->bezt ) {
for( i = 0; i < 3; i++ )
for( j = 0; j < 3; j++ )
ptrnurb->bezt[numpoint].vec[i][j] =
(float)PyFloat_AsDouble( PyList_GetItem
( listargs,
i * 3 + j ) );
+ if (PyList_Size (listargs) > 9)
+ ptrnurb->bezt[numpoint].weight = (float)PyFloat_AsDouble( PyList_GetItem
+ ( listargs, 9 ) );
+ }
Py_INCREF( Py_None );
return Py_None;
@@ -883,6 +887,9 @@
PyList_Append( liste, item );
Py_DECREF(item);
}
+ item = PyFloat_FromDouble( ptrnurb->bezt[numpoint].weight );
+ PyList_Append( liste, item );
+ Py_DECREF(item);
}
return liste;

File Metadata

Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
0b/8e/dfdfbd4f464e95254de4df47a8fd

Event Timeline