From bce2c02fdd6ebaf88ffc0950e87de96b0b65377f Mon Sep 17 00:00:00 2001 From: Stephen Swaney Date: Wed, 21 Jul 2004 21:01:15 +0000 Subject: New Curve method Curve.appendPoint( numcurve, newpoint ) to add points to a Curve. New supporting module CurNurb to provide access to the curves in a Curve and their associated points. Curve module now supports Python iterator and sequence protocols. This allows typical python programming idioms using 'for' statement and the [] operator. # example 1 for curve in a_curve: for point in curve: print point #example 2 curnurb = a_curve[0] curnurb.append( [1,1,1,1] ) Still under construction. Epydoc will follow. --- source/blender/python/api2_2x/Blender.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/blender/python/api2_2x/Blender.c') diff --git a/source/blender/python/api2_2x/Blender.c b/source/blender/python/api2_2x/Blender.c index 749f4255715..1414c37e489 100644 --- a/source/blender/python/api2_2x/Blender.c +++ b/source/blender/python/api2_2x/Blender.c @@ -1,5 +1,5 @@ /* - * + * $Id$ * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -512,6 +512,8 @@ void M_Blender_Init (void) PyDict_SetItemString (dict, "Mathutils",Mathutils_Init()); PyDict_SetItemString (dict, "Library", Library_Init()); + PyDict_SetItemString (dict, "CurNurb", CurNurb_Init()); + PyModule_AddIntConstant(module, "TRUE", 1); PyModule_AddIntConstant(module, "FALSE", 0); } -- cgit v1.2.3