[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [11378] trunk/blender/source/blender/ python/api2_2x/Curve.c: fix from 2.44 for adding new curves.
Campbell Barton
cbarton at metavr.com
Thu Jul 26 16:32:32 CEST 2007
Revision: 11378
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11378
Author: campbellbarton
Date: 2007-07-26 16:32:32 +0200 (Thu, 26 Jul 2007)
Log Message:
-----------
fix from 2.44 for adding new curves.
Modified Paths:
--------------
trunk/blender/source/blender/python/api2_2x/Curve.c
Modified: trunk/blender/source/blender/python/api2_2x/Curve.c
===================================================================
--- trunk/blender/source/blender/python/api2_2x/Curve.c 2007-07-26 14:04:40 UTC (rev 11377)
+++ trunk/blender/source/blender/python/api2_2x/Curve.c 2007-07-26 14:32:32 UTC (rev 11378)
@@ -809,27 +809,14 @@
static PyObject *Curve_appendNurb( BPy_Curve * self, PyObject * value )
{
- Nurb *nurb_ptr = self->curve->nurb.first;
- Nurb **pptr = ( Nurb ** ) & ( self->curve->nurb.first );
Nurb *new_nurb;
-
-
- /* walk to end of nurblist */
- if( nurb_ptr ) {
- while( nurb_ptr->next ) {
- nurb_ptr = nurb_ptr->next;
- }
- pptr = &nurb_ptr->next;
- }
-
/* malloc new nurb */
new_nurb = ( Nurb * ) MEM_callocN( sizeof( Nurb ), "appendNurb" );
if( !new_nurb )
return EXPP_ReturnPyObjError
( PyExc_MemoryError, "unable to malloc Nurb" );
-
+
if( CurNurb_appendPointToNurb( new_nurb, value ) ) {
- *pptr = new_nurb;
new_nurb->resolu = self->curve->resolu;
new_nurb->resolv = self->curve->resolv;
new_nurb->hide = 0;
@@ -856,6 +843,7 @@
new_nurb->knotsu = 0;
/*makenots( new_nurb, 1, new_nurb->flagu >> 1); */
}
+ BLI_addtail( &self->curve->nurb, new_nurb);
} else {
freeNurb( new_nurb );
More information about the Bf-blender-cvs
mailing list