Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Swaney <sswaney@centurytel.net>2004-07-22 01:01:15 +0400
committerStephen Swaney <sswaney@centurytel.net>2004-07-22 01:01:15 +0400
commitbce2c02fdd6ebaf88ffc0950e87de96b0b65377f (patch)
tree708d01a564f56cb729d8e536c8de15c70f7349dd /source/blender/python/api2_2x/Types.c
parent1c5302e68b47c03fd60ab5edefb4a16d6294b7a7 (diff)
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.
Diffstat (limited to 'source/blender/python/api2_2x/Types.c')
-rw-r--r--source/blender/python/api2_2x/Types.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/python/api2_2x/Types.c b/source/blender/python/api2_2x/Types.c
index a2dc2b0f212..3aa425101fb 100644
--- a/source/blender/python/api2_2x/Types.c
+++ b/source/blender/python/api2_2x/Types.c
@@ -1,5 +1,5 @@
/*
- *
+ * $Id$
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -35,7 +35,7 @@ char M_Types_doc[] =
"The Blender Types module\n\n\
This module is a dictionary of all Blender Python types";
-struct PyMethodDef Null_methods[] = {{NULL, NULL}};
+struct PyMethodDef Null_methods[] = {{NULL, NULL, 0, NULL}};
void types_InitAll(void)
{
@@ -52,6 +52,7 @@ void types_InitAll(void)
Build_Type.ob_type = &PyType_Type;
Button_Type.ob_type = &PyType_Type;
Camera_Type.ob_type = &PyType_Type;
+ CurNurb_Type.ob_type = &PyType_Type;
Curve_Type.ob_type = &PyType_Type;
Effect_Type.ob_type = &PyType_Type;
Image_Type.ob_type = &PyType_Type;
@@ -112,7 +113,9 @@ PyObject *Types_Init (void)
PyDict_SetItemString(dict, "ArmatureType", (PyObject *)&Armature_Type);
PyDict_SetItemString(dict, "BoneType", (PyObject *)&Bone_Type);
- PyDict_SetItemString(dict, "CurveType", (PyObject *)&Curve_Type);
+ PyDict_SetItemString(dict, "CurNurb_Type", (PyObject *)&CurNurb_Type);
+ PyDict_SetItemString(dict, "CurveType", (PyObject *)&Curve_Type);
+
PyDict_SetItemString(dict, "IpoType", (PyObject *)&Ipo_Type);
PyDict_SetItemString(dict, "MetaballType", (PyObject *)&Metaball_Type);