diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2011-08-05 05:21:08 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2011-08-05 05:21:08 +0400 |
commit | 74b94dcdf64000c7d681530bf8c833196c58f17d (patch) | |
tree | 716c2117cb90c3bcdf4b4cf7829c0fcc74c84413 /source/blender/blenloader | |
parent | e9bd246e3bb71403690364ffb4b58d2cdd7e3998 (diff) |
BGE Animations: Moving the do_versions code for the actuators back into the "put compatibility code here until next subversion bump" block. It got sucked into the 2.58.1 block during a merge sometime.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 77 |
1 files changed, 38 insertions, 39 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 435ae62123a..e22f5dcb3de 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -11733,45 +11733,6 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } } } - - { - /* convert fcurve and shape action actuators to action actuators */ - Object *ob; - bActuator *act; - bIpoActuator *ia; - bActionActuator *aa; - - for (ob= main->object.first; ob; ob= ob->id.next) { - for (act= ob->actuators.first; act; act= act->next) { - if (act->type == ACT_IPO) { - // Create the new actuator - ia= act->data; - aa= MEM_callocN(sizeof(bActionActuator), "fcurve -> action actuator do_version"); - - // Copy values - aa->type = ia->type; - aa->flag = ia->flag; - aa->sta = ia->sta; - aa->end = ia->end; - strcpy(aa->name, ia->name); - strcpy(aa->frameProp, ia->frameProp); - if (ob->adt) - aa->act = ob->adt->action; - - // Get rid of the old actuator - MEM_freeN(ia); - - // Assign the new actuator - act->data = aa; - act->type= act->otype= ACT_ACTION; - - } - else if (act->type == ACT_SHAPEACTION) { - act->type = act->otype = ACT_ACTION; - } - } - } - } { ParticleSettings *part; @@ -11831,6 +11792,44 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } } } + { + /* convert fcurve and shape action actuators to action actuators */ + Object *ob; + bActuator *act; + bIpoActuator *ia; + bActionActuator *aa; + + for (ob= main->object.first; ob; ob= ob->id.next) { + for (act= ob->actuators.first; act; act= act->next) { + if (act->type == ACT_IPO) { + // Create the new actuator + ia= act->data; + aa= MEM_callocN(sizeof(bActionActuator), "fcurve -> action actuator do_version"); + + // Copy values + aa->type = ia->type; + aa->flag = ia->flag; + aa->sta = ia->sta; + aa->end = ia->end; + strcpy(aa->name, ia->name); + strcpy(aa->frameProp, ia->frameProp); + if (ob->adt) + aa->act = ob->adt->action; + + // Get rid of the old actuator + MEM_freeN(ia); + + // Assign the new actuator + act->data = aa; + act->type= act->otype= ACT_ACTION; + + } + else if (act->type == ACT_SHAPEACTION) { + act->type = act->otype = ACT_ACTION; + } + } + } + } } /* WATCH IT!!!: pointers from libdata have not been converted yet here! */ |