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
path: root/source
diff options
context:
space:
mode:
authorKen Hughes <khughes@pacific.edu>2005-12-05 08:23:35 +0300
committerKen Hughes <khughes@pacific.edu>2005-12-05 08:23:35 +0300
commitbf05bbef869cb8c272df3cc3079d5ee51d1529b7 (patch)
tree37ec172d1ff12d216bb8f3875dba5b2550334874 /source
parent00ce7c629f1ce972c57c9a871b4f892de45ed93d (diff)
Fix unchecked parameter in M_Ipo_Recalc, and some documentation fixes.
Diffstat (limited to 'source')
-rw-r--r--source/blender/python/api2_2x/Ipo.c49
-rw-r--r--source/blender/python/api2_2x/doc/Ipo.py38
2 files changed, 40 insertions, 47 deletions
diff --git a/source/blender/python/api2_2x/Ipo.c b/source/blender/python/api2_2x/Ipo.c
index c81c6a2fef7..51a70706ae4 100644
--- a/source/blender/python/api2_2x/Ipo.c
+++ b/source/blender/python/api2_2x/Ipo.c
@@ -110,39 +110,37 @@ static PyMethodDef BPy_Ipo_methods[] = {
{"setName", ( PyCFunction ) Ipo_setName, METH_VARARGS,
"(str) - Change Ipo Data name"},
{"getBlocktype", ( PyCFunction ) Ipo_getBlocktype, METH_NOARGS,
- "() - Return Ipo blocktype -"},
+ "() - Return Ipo blocktype"},
{"setBlocktype", ( PyCFunction ) Ipo_setBlocktype, METH_VARARGS,
"(str) - Change Ipo blocktype"},
{"getRctf", ( PyCFunction ) Ipo_getRctf, METH_NOARGS,
- "() - Return Ipo rctf - "},
+ "() - Return Ipo rctf"},
{"setRctf", ( PyCFunction ) Ipo_setRctf, METH_VARARGS,
- "(str) - Change Ipo rctf"},
+ "(flt,flt,flt,flt) - Change Ipo rctf"},
{"addCurve", ( PyCFunction ) Ipo_addCurve, METH_VARARGS,
- "() - Return Ipo ncurves"},
+ "() - Add a curve to Ipo"},
{"delCurve", ( PyCFunction ) Ipo_delCurve, METH_VARARGS,
- "() - Delete Ipo curves"},
+ "(str) - Delete curve from Ipo"},
{"getNcurves", ( PyCFunction ) Ipo_getNcurves, METH_NOARGS,
- "() - Return Ipo ncurves"},
+ "() - Return number of Ipo curves"},
{"getNBezPoints", ( PyCFunction ) Ipo_getNBezPoints, METH_VARARGS,
- "() - Return curve number of Bez points"},
+ "(int) - Return number of Bez points on an Ipo curve"},
{"delBezPoint", ( PyCFunction ) Ipo_DeleteBezPoints, METH_VARARGS,
- "() - Return curve number of Bez points"},
+ "(int) - deprecated: use ipocurve.delBezier()"},
{"getCurveBP", ( PyCFunction ) Ipo_getCurveBP, METH_VARARGS,
- "() - Return Ipo ncurves"},
+ "() - unsupported"},
{"EvaluateCurveOn", ( PyCFunction ) Ipo_EvaluateCurveOn, METH_VARARGS,
- "() - Return curve value at given time"},
+ "(int,flt) - deprecated: see ipocurve.evaluate()"},
{"getCurveCurval", ( PyCFunction ) Ipo_getCurvecurval, METH_VARARGS,
- "() - Return curval"},
- {"getCurveBeztriple", ( PyCFunction ) Ipo_getCurveBeztriple,
- METH_VARARGS,
- "() - Return Ipo ncurves"},
- {"setCurveBeztriple", ( PyCFunction ) Ipo_setCurveBeztriple,
- METH_VARARGS,
- "() - Return curval"},
+ "(int) - deprecated: see ipocurve.evaluate()"},
+ {"getCurveBeztriple", ( PyCFunction ) Ipo_getCurveBeztriple, METH_VARARGS,
+ "(int,int) - deprecated: see ipocurve.bezierPoints[]"},
+ {"setCurveBeztriple", ( PyCFunction ) Ipo_setCurveBeztriple, METH_VARARGS,
+ "(int,int,list) - set a BezTriple"},
{"getCurves", ( PyCFunction ) Ipo_getCurves, METH_NOARGS,
- "() - Return curval"},
+ "() - Return list of all defined Ipo curves"},
{"getCurve", ( PyCFunction ) Ipo_getCurve, METH_VARARGS,
- "() - Return curval"},
+ "(str|int) - Returns specified Ipo curve"},
{NULL, NULL, 0, NULL}
};
@@ -321,13 +319,14 @@ static PyObject *M_Ipo_Get( PyObject * self, PyObject * args )
static PyObject *M_Ipo_Recalc( PyObject * self, PyObject * args )
{
- void testhandles_ipocurve( IpoCurve * icu );
- PyObject *a;
+ PyObject *obj;
IpoCurve *icu;
- if( !PyArg_ParseTuple( args, "O", &a ) )
- return ( EXPP_ReturnPyObjError
- ( PyExc_TypeError, "expected ipo argument)" ) );
- icu = IpoCurve_FromPyObject( a );
+
+ if( !PyArg_ParseTuple( args, "O!", &IpoCurve_Type, &obj ) )
+ return EXPP_ReturnPyObjError( PyExc_TypeError,
+ "expected Ipo curve argument" );
+
+ icu = IpoCurve_FromPyObject( obj );
testhandles_ipocurve( icu );
Py_INCREF( Py_None );
diff --git a/source/blender/python/api2_2x/doc/Ipo.py b/source/blender/python/api2_2x/doc/Ipo.py
index 4244f89a9d5..d2b8d97b69c 100644
--- a/source/blender/python/api2_2x/doc/Ipo.py
+++ b/source/blender/python/api2_2x/doc/Ipo.py
@@ -232,7 +232,8 @@ class Ipo:
def getCurveCurval(curvepos):
"""
- Gets the current value of a curve of the Ipo.
+ Gets the current value of a curve of the Ipo (B{deprecated}). B{Note}:
+ new scripts should use L{IpoCurve.evaluate()}.
@type curvepos: int or string
@param curvepos: the position of the curve in the ipo or the name of the
curve
@@ -242,11 +243,12 @@ class Ipo:
def EvaluateCurveOn(curvepos,time):
"""
- Gets the current value of a curve of the Ipo.
+ Gets the value at a specific time of a curve of the Ipo (B{deprecated}).
+ B{Note}: new scripts should use L{IpoCurve.evaluate()}.
@type curvepos: int
- @param curvepos: the position of the curve in the ipo
+ @param curvepos: the position of the curve in the Ipo.
@type time: float
- @param time: the position of the curve in the ipo
+ @param time: the desired time.
@rtype: float
@return: the current value of the selected curve of the Ipo at the given
time.
@@ -261,27 +263,19 @@ class IpoCurve:
Important Notes for Rotation Curves:\n
For the rotation IpoCurves, the y values for points are in units of 10 degrees. For example, 45.0 degrees is stored as 4.50 degrees. These are the same numbers you see in the Transform Properties pupmenu ( NKey ) in the IPO Curve Editor window. Positive rotations are in a counter-clockwise direction, just like in math class.
- @ivar driver: Status of Driver
- 1: on
- 0: off
- @type driver: int
- @ivar driverObject: Object Used to Drive the IpoCurve
- @type driverObject: Object
- @ivar driverChannel: Object Channel Used to Drive the IpoCurve
- Use module constants
- IpoCurve.LOC_X
- IpoCurve.LOC_Y
- IpoCurve.LOC_Z
- IpoCurve.ROT_X
- IpoCurve.ROT_Y
- IpoCurve.ROT_Z
- IpoCurve.SIZE_X
- IpoCurve.SIZE_Y
- IpoCurve.SIZE_Z
+ @ivar driver: Status of Driver. 1= on, 0= off.
+ @type driver: int
+ @ivar driverObject: Object used to frive the IpoCurve.
+ @type driverObject: Object
+ @ivar driverChannel: Object Channel Used to Drive the IpoCurve.
+ Use module constants: IpoCurve.LOC_X, IpoCurve.LOC_Y, IpoCurve.LOC_Z,
+ IpoCurve.ROT_X, IpoCurve.ROT_Y, IpoCurve.ROT_Z, IpoCurve.SIZE_X,
+ IpoCurve.SIZE_Y, IpoCurve.SIZE_Z
@type driverChannel: int
-
@ivar name: The Curve Data name.
+ @type name: string
@ivar bezierPoints : The list of the Bezier points.
+ @type bezierPoints : list
"""
def setExtrapolation(extendmode):