From 28f0eeaf61cbc756f08c66073efe3eeff098621f Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Mon, 10 Oct 2005 18:57:55 +0000 Subject: [PATCH] Ack! Recently the get_ipocurve was added in the game engine, for baking physics. This creates very bad dependencies... tsk! comments indicate it though; //quick hack //todo, before 2.38/2.40 release, Erwin Hrms... :) --- .../Converter/KX_BlenderSceneConverter.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp index 901c37daa07..6ba96e3a211 100644 --- a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp +++ b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp @@ -509,7 +509,7 @@ extern "C" { Ipo *add_ipo( char *name, int idcode ); char *getIpoCurveName( IpoCurve * icu ); - struct IpoCurve *get_ipocurve(struct ID *from, short type, int adrcode, struct Ipo *useipo); + struct IpoCurve *verify_ipocurve(struct ID *, short, char *, char *, int); void testhandles_ipocurve(struct IpoCurve *icu); void Mat3ToEul(float tmat[][3], float *eul); @@ -672,27 +672,27 @@ void KX_BlenderSceneConverter::WritePhysicsObjectToAnimationIpo(int frameNumber) IpoCurve *icu1 = findIpoCurve((IpoCurve *)ipo->curve.first,"LocX"); if (!icu1) - icu1 = get_ipocurve( NULL, ipo->blocktype, OB_LOC_X, ipo ); + icu1 = verify_ipocurve(&blenderObject->id, ipo->blocktype, NULL, NULL, OB_LOC_X); icu1 = findIpoCurve((IpoCurve *)ipo->curve.first,"LocY"); if (!icu1) - icu1 = get_ipocurve( NULL, ipo->blocktype, OB_LOC_Y, ipo ); + icu1 = verify_ipocurve(&blenderObject->id, ipo->blocktype, NULL, NULL, OB_LOC_Y); icu1 = findIpoCurve((IpoCurve *)ipo->curve.first,"LocZ"); if (!icu1) - icu1 = get_ipocurve( NULL, ipo->blocktype, OB_LOC_Z, ipo ); + icu1 = verify_ipocurve(&blenderObject->id, ipo->blocktype, NULL, NULL, OB_LOC_Z); icu1 = findIpoCurve((IpoCurve *)ipo->curve.first,"RotX"); if (!icu1) - icu1 = get_ipocurve( NULL, ipo->blocktype, OB_ROT_X, ipo ); + icu1 = verify_ipocurve(&blenderObject->id, ipo->blocktype, NULL, NULL, OB_ROT_X); icu1 = findIpoCurve((IpoCurve *)ipo->curve.first,"RotY"); if (!icu1) - icu1 = get_ipocurve( NULL, ipo->blocktype, OB_ROT_Y, ipo ); + icu1 = verify_ipocurve(&blenderObject->id, ipo->blocktype, NULL, NULL, OB_ROT_Y); icu1 = findIpoCurve((IpoCurve *)ipo->curve.first,"RotZ"); if (!icu1) - icu1 = get_ipocurve( NULL, ipo->blocktype, OB_ROT_Z, ipo ); + icu1 = verify_ipocurve(&blenderObject->id, ipo->blocktype, NULL, NULL, OB_ROT_Z); @@ -862,7 +862,7 @@ void KX_BlenderSceneConverter::WritePhysicsObjectToAnimationIpo(int frameNumber) ( PyExc_NameError, "curve name was invalid" ); /* ask blender to create the new ipo curve */ - icu = get_ipocurve( NULL, ipo->blocktype, param, self->ipo ); + icu = verify_ipocurve( NULL, ipo->blocktype, NULL, NULL, param); if( icu == 0 ) /* could not create curve */ return EXPP_ReturnPyObjError