removed blender2cal3d.py, this is the second time where nobody has been able to maintain this script to fix minor bugs, aparently the cal3d/soya guys maintain their own scripts anyhow.

Adding switchDirection() for curNurbs. simple function and double checked to make sure its ok.
This commit is contained in:
2007-01-04 10:18:37 +00:00
parent eb1ca77fc4
commit 50edac630b
3 changed files with 31 additions and 1520 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -62,6 +62,7 @@ PyObject *CurNurb_append( BPy_CurNurb * self, PyObject * args );
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 );
char M_CurNurb_doc[] = "CurNurb";
@@ -130,6 +131,8 @@ static PyMethodDef BPy_CurNurb_methods[] = {
"( ) - boolean function tests if this spline is cyclic (closed) or not (open)"},
{"dump", ( PyCFunction ) CurNurb_dump, METH_NOARGS,
"( ) - dumps Nurb data)"},
{"switchDirection", ( PyCFunction ) CurNurb_switchDirection, METH_NOARGS,
"( ) - swaps curve beginning and end)"},
{NULL, NULL, 0, NULL}
};
@@ -1060,3 +1063,16 @@ PyObject *CurNurb_dump( BPy_CurNurb * self )
Py_RETURN_NONE;
}
PyObject *CurNurb_switchDirection( BPy_CurNurb * self ) {
Nurb *nurb = self->nurb;
if( ! self->nurb ){ /* bail on error */
printf("\n no Nurb in this CurNurb");
Py_RETURN_NONE;
}
switchdirectionNurb( nurb );
Py_RETURN_NONE;
}

View File

@@ -467,6 +467,21 @@ class Curve:
@raise AttributeError: throws exception if curve_num is out of range.
"""
def switchDirection( ):
"""
Reverse the direction of a curve.
@return: None
I{B{Example:}}
# This example switches the direction of all curves on the active object.
from Blender import *
scn = Scene.GetCurrent()
ob = scn.objects.active # must be a curve
data = ob.data
for cu in data: cu.switchDirection()
"""
def getNumCurves():
"""
Get the number of curves in this Curve Data object.