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
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2005-10-10 22:05:30 +0400
committerTon Roosendaal <ton@blender.org>2005-10-10 22:05:30 +0400
commit4bd9775936c1b5a1656713d8c6a679b711b93d93 (patch)
tree7a4d0c39ffef76f3f34f5dea7ad85a02587414a1 /source/blender/python/api2_2x/Ipo.c
parent9b8868532a9e0970f83eb68ef36144eaca9525a1 (diff)
Stupid me! Committed in wrong console with wrong dir... here's the rest of
all files for the Ipo/Action/NLA makeover...
Diffstat (limited to 'source/blender/python/api2_2x/Ipo.c')
-rw-r--r--source/blender/python/api2_2x/Ipo.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/source/blender/python/api2_2x/Ipo.c b/source/blender/python/api2_2x/Ipo.c
index 55f6147012c..8ecd3bb5041 100644
--- a/source/blender/python/api2_2x/Ipo.c
+++ b/source/blender/python/api2_2x/Ipo.c
@@ -212,9 +212,9 @@ static PyObject *M_Ipo_New( PyObject * self, PyObject * args )
if( !strcmp( code, "Lamp" ) )
idcode = ID_LA;
if( !strcmp( code, "Action" ) )
- idcode = ID_AC;
+ idcode = ID_PO;
if( !strcmp( code, "Constraint" ) )
- idcode = IPO_CO;
+ idcode = ID_CO;
if( !strcmp( code, "Sequence" ) )
idcode = ID_SEQ;
if( !strcmp( code, "Curve" ) )
@@ -890,10 +890,10 @@ static PyObject *Ipo_addCurve( BPy_Ipo * self, PyObject * args )
case ID_MA:
ok = Ipo_maIcuName( cur_name, &param );
break;
- case ID_AC:
+ case ID_PO:
ok = Ipo_acIcuName( cur_name, &param );
break;
- case IPO_CO:
+ case ID_CO:
ok = Ipo_coIcuName( cur_name, &param );
break;
case ID_CU:
@@ -913,14 +913,13 @@ static PyObject *Ipo_addCurve( BPy_Ipo * self, PyObject * args )
return EXPP_ReturnPyObjError
( PyExc_NameError, "curve name was invalid" );
- /* ask blender to create the new ipo curve */
- icu = get_ipocurve( NULL, ipo->blocktype, param, self->ipo );
-
- if( icu == 0 ) /* could not create curve */
- return EXPP_ReturnPyObjError
- ( PyExc_RuntimeError,
- "blender could not create ipo curve" );
-
+ /* create the new ipo curve */
+ icu = MEM_callocN(sizeof(IpoCurve), "Pyhon added ipocurve");
+ icu->blocktype= ipo->blocktype;
+ icu->flag |= IPO_VISIBLE|IPO_AUTO_HORIZ;
+ icu->blocktype= ipo->blocktype;
+ icu->adrcode= param;
+
allspace( REMAKEIPO, 0 );
EXPP_allqueue( REDRAWIPO, 0 );