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:
authorKen Hughes <khughes@pacific.edu>2006-08-28 08:44:16 +0400
committerKen Hughes <khughes@pacific.edu>2006-08-28 08:44:16 +0400
commit81d7cd967da72b7cc765ec3bfc3f3097237c8c70 (patch)
tree0b114c69d54cee9e7043131a6e0c2f2f8f7940ba /source/blender/python/api2_2x/Types.c
parentb880bffd320952efa48cb5e3419b8d3f634d1d28 (diff)
===Python API===
New API for accessing surface data (SurbNurb type). Right now it's hooked in through the Curve API, since Curve.Get() doesn't differentiate between curves and surfaces. If the curve object is 2D (pntsv > 1), the SurfNurb object is created. It is similar to the CurNurb type but not identical. There are only attributes and no methods yet, and the only methods which will be added are the non-getStuff/setStuff kind. Read the documentation to see how it works (sorry, no examples yet). This is a work in progress. Don't be surprised if the API changes some more.
Diffstat (limited to 'source/blender/python/api2_2x/Types.c')
-rw-r--r--source/blender/python/api2_2x/Types.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/python/api2_2x/Types.c b/source/blender/python/api2_2x/Types.c
index 1dadcfc90c4..5bc6199b170 100644
--- a/source/blender/python/api2_2x/Types.c
+++ b/source/blender/python/api2_2x/Types.c
@@ -40,7 +40,7 @@ extern PyTypeObject Action_Type, Armature_Type;
extern PyTypeObject Pose_Type;
extern PyTypeObject BezTriple_Type, Bone_Type, Button_Type;
extern PyTypeObject Camera_Type;
-extern PyTypeObject CurNurb_Type;
+extern PyTypeObject CurNurb_Type, SurfNurb_Type;
extern PyTypeObject Curve_Type;
extern PyTypeObject Effect_Type, Font_Type;
extern PyTypeObject Image_Type, Ipo_Type, IpoCurve_Type;
@@ -109,6 +109,7 @@ void types_InitAll( void )
Group_Type.ob_type = &PyType_Type;
RenderData_Type.ob_type = &PyType_Type;
Scene_Type.ob_type = &PyType_Type;
+ SurfNurb_Type.ob_type = &PyType_Type;
Text_Type.ob_type = &PyType_Type;
Text3d_Type.ob_type = &PyType_Type;
Texture_Type.ob_type = &PyType_Type;
@@ -177,6 +178,8 @@ PyObject *Types_Init( void )
PyDict_SetItemString( dict, "CurNurb_Type",
( PyObject * ) &CurNurb_Type );
+ PyDict_SetItemString( dict, "SurfNurb_Type",
+ ( PyObject * ) &SurfNurb_Type );
PyDict_SetItemString( dict, "CurveType", ( PyObject * ) &Curve_Type );
PyDict_SetItemString( dict, "IpoType", ( PyObject * ) &Ipo_Type );