Page MenuHome

stage1-patch-BNURBPoints.txt

Authored By
Ken Hughes (khughes)
Nov 13 2013, 1:05 PM
Size
2 KB
Subscribers
None

stage1-patch-BNURBPoints.txt

Index: source/blender/python/SConscript
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/python/SConscript,v
retrieving revision 1.23
diff -u -r1.23 SConscript
--- source/blender/python/SConscript 4 May 2005 23:18:10 -0000 1.23
+++ source/blender/python/SConscript 28 Jun 2005 17:17:11 -0000
@@ -12,6 +12,7 @@
'api2_2x/BGL.c',
'api2_2x/Blender.c',
'api2_2x/Bone.c',
+ 'api2_2x/BNURBPoint.c',
'api2_2x/Build.c',
'api2_2x/Camera.c',
'api2_2x/CurNurb.c',
Index: source/blender/python/api2_2x/Blender.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/python/api2_2x/Blender.c,v
retrieving revision 1.62
diff -u -r1.62 Blender.c
--- source/blender/python/api2_2x/Blender.c 21 Jun 2005 14:14:41 -0000 1.62
+++ source/blender/python/api2_2x/Blender.c 28 Jun 2005 17:17:11 -0000
@@ -805,6 +805,7 @@
PyDict_SetItemString( dict, "Sound", Sound_Init( ) );
PyDict_SetItemString( dict, "CurNurb", CurNurb_Init( ) );
PyDict_SetItemString( dict, "BezTriple", BezTriple_Init( ) );
+ PyDict_SetItemString( dict, "BNURBPoint", BNURBPoint_Init( ) );
PyModule_AddIntConstant( module, "TRUE", 1 );
PyModule_AddIntConstant( module, "FALSE", 0 );
Index: source/blender/python/api2_2x/CurNurb.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/python/api2_2x/CurNurb.c,v
retrieving revision 1.12
diff -u -r1.12 CurNurb.c
--- source/blender/python/api2_2x/CurNurb.c 17 Jun 2005 04:40:07 -0000 1.12
+++ source/blender/python/api2_2x/CurNurb.c 28 Jun 2005 17:17:12 -0000
@@ -29,6 +29,8 @@
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
+#define HAVE_BNURBPoint
+
#include "Python.h"
#include "DNA_curve_types.h"
#include "BKE_curve.h"
@@ -38,6 +40,9 @@
#include "gen_utils.h"
#include "CurNurb.h"
#include "BezTriple.h"
+#ifdef HAVE_BNURBPoint
+#include "BNURBPoint.h"
+#endif
/*
@@ -436,7 +441,7 @@
* arg is BezTriple or list of xyzw floats
*/
-PyObject *CurNurb_append( BPy_CurNurb * self, PyObject * args )
+static PyObject *CurNurb_append( BPy_CurNurb * self, PyObject * args )
{
Nurb *nurb = self->nurb;
@@ -935,6 +940,9 @@
PyObject *pyo;
if( nurb->bp ) { /* we have a nurb curve */
+#ifdef HAVE_BNURBPoint
+ pyo = BNURBPoint_CreatePyObject( &( nurb->bp[index] ) );
+#else
int i;
/* add Tilt only if curve is 3D */
@@ -953,6 +961,7 @@
if (nurb->flag & CU_3D)
PyList_SetItem( pyo, 4, PyFloat_FromDouble( nurb->bp[index].alfa ) );
+#endif
} else if( nurb->bezt ) { /* we have a bezier */
/* if an error occurs, we just pass it on */
pyo = BezTriple_CreatePyObject( &( nurb->bezt[index] ) );

File Metadata

Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
2a/9d/5778eeecb6a762d10027942218a2

Event Timeline