diff options
author | Stephen Swaney <sswaney@centurytel.net> | 2004-04-26 21:21:51 +0400 |
---|---|---|
committer | Stephen Swaney <sswaney@centurytel.net> | 2004-04-26 21:21:51 +0400 |
commit | 0e156156b1a420145fcdf7c042ab1abef92e4959 (patch) | |
tree | 36838351369630f1f4124553c21410e7a813da6e | |
parent | 6d2970e40691c04e672b8150a5a702d6716d9fa9 (diff) |
bugfix: Ipo.addCurve() was creating a new Ipo block and adding curve there
instead of adding curve to existing Ipo. reported on elysiun.
-rw-r--r-- | source/blender/python/api2_2x/Ipo.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/python/api2_2x/Ipo.c b/source/blender/python/api2_2x/Ipo.c index e3dc0a5c9e1..721f7f4a4c0 100644 --- a/source/blender/python/api2_2x/Ipo.c +++ b/source/blender/python/api2_2x/Ipo.c @@ -603,7 +603,10 @@ Ipo_addCurve (BPy_Ipo * self, PyObject * args) if (!ok) return (EXPP_ReturnPyObjError (PyExc_ValueError, "Not a valid param.")); - icu = get_ipocurve (&(object->id), ID_OB, param, 0); + /* add a new curve to the ipo. we pass in self->ipo so a new one does + not get created */ + icu = get_ipocurve (&(object->id), ID_OB, param, self->ipo ); + #define REMAKEIPO 1 #define REDRAWIPO 0x4023 @@ -836,9 +839,11 @@ Ipo_EvaluateCurveOn (BPy_Ipo * self, PyObject * args) if (!PyArg_ParseTuple (args, "if", &num, &time)) return (EXPP_ReturnPyObjError (PyExc_TypeError, "expected int argument")); + icu = self->ipo->curve.first; if (!icu) return (EXPP_ReturnPyObjError (PyExc_TypeError, "No IPO curve")); + for (i = 0; i < num; i++) { if (!icu) |