diff options
author | Ken Hughes <khughes@pacific.edu> | 2007-01-13 01:40:30 +0300 |
---|---|---|
committer | Ken Hughes <khughes@pacific.edu> | 2007-01-13 01:40:30 +0300 |
commit | 59f8507a8747495a907c8b2c683d277e724df4a9 (patch) | |
tree | 69b14cbd1b1450394006a801a8dfbb879cc098de /source/blender/python/api2_2x/CurNurb.c | |
parent | 9c0cb4632dadef99a0c7a37e1993752049989782 (diff) |
Python API
----------
Added CurNurb.recalc() method. I thought I had commited this before as part
of a bugfix but obviously not. It allows control point handles be recalculated
after changing a curve's bezTriples.
Diffstat (limited to 'source/blender/python/api2_2x/CurNurb.c')
-rw-r--r-- | source/blender/python/api2_2x/CurNurb.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/source/blender/python/api2_2x/CurNurb.c b/source/blender/python/api2_2x/CurNurb.c index a4a1f4505da..225db84c454 100644 --- a/source/blender/python/api2_2x/CurNurb.c +++ b/source/blender/python/api2_2x/CurNurb.c @@ -63,6 +63,7 @@ static PyObject *CurNurb_isNurb( BPy_CurNurb * self ); static PyObject *CurNurb_isCyclic( BPy_CurNurb * self ); static PyObject *CurNurb_dump( BPy_CurNurb * self ); static PyObject *CurNurb_switchDirection( BPy_CurNurb * self ); +static PyObject *CurNurb_recalc( BPy_CurNurb * self ); char M_CurNurb_doc[] = "CurNurb"; @@ -133,6 +134,8 @@ static PyMethodDef BPy_CurNurb_methods[] = { "( ) - dumps Nurb data)"}, {"switchDirection", ( PyCFunction ) CurNurb_switchDirection, METH_NOARGS, "( ) - swaps curve beginning and end)"}, + {"recalc", ( PyCFunction ) CurNurb_recalc, METH_NOARGS, + "( ) - recalc Nurb data)"}, {NULL, NULL, 0, NULL} }; @@ -992,7 +995,6 @@ PyObject *CurNurb_Init( void ) return ( submodule ); } - /* dump nurb */ @@ -1064,6 +1066,16 @@ PyObject *CurNurb_dump( BPy_CurNurb * self ) Py_RETURN_NONE; } +/* + recalc nurb +*/ + +static PyObject *CurNurb_recalc( BPy_CurNurb * self ) +{ + calchandlesNurb ( self->nurb ); + Py_RETURN_NONE; +} + PyObject *CurNurb_switchDirection( BPy_CurNurb * self ) { Nurb *nurb = self->nurb; if( ! self->nurb ){ /* bail on error */ @@ -1075,4 +1087,3 @@ PyObject *CurNurb_switchDirection( BPy_CurNurb * self ) { Py_RETURN_NONE; } - |