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:
authorMitchell Stokes <mogurijin@gmail.com>2012-06-21 10:27:51 +0400
committerMitchell Stokes <mogurijin@gmail.com>2012-06-21 10:27:51 +0400
commit7ef54879ed8bb157046e305da554cae907adf6e8 (patch)
treed2ef5bd2a17a7580d3f6aa8ffd79181c39a69e61 /source/blender/blenkernel/intern/ipo.c
parentd8e2c475a0dbfb9de31c363f76899435d80cff8f (diff)
Fix for properly converting 2.4x IPO Actuators to 2.6x Action Actuators. Previously the converted Action Actuators would not have an action assigned. This fix is based on code provided by Maxim Aleynikov in his report: [#30410] not full conversion IPO Actuator in Action Actuator.
Diffstat (limited to 'source/blender/blenkernel/intern/ipo.c')
-rw-r--r--source/blender/blenkernel/intern/ipo.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c
index bbc1874c2ae..f51fee674cf 100644
--- a/source/blender/blenkernel/intern/ipo.c
+++ b/source/blender/blenkernel/intern/ipo.c
@@ -46,6 +46,7 @@
/* since we have versioning code here */
#define DNA_DEPRECATED_ALLOW
+#include "DNA_actuator_types.h"
#include "DNA_anim_types.h"
#include "DNA_constraint_types.h"
#include "DNA_camera_types.h"
@@ -1753,6 +1754,24 @@ void do_versions_ipos_to_animato(Main *main)
ipo_to_animdata(id, ob->ipo, NULL, NULL, NULL);
ob->ipo->id.us--;
ob->ipo = NULL;
+
+ {
+ /* If we have any empty action actuators, assume they were
+ converted IPO Actuators using the object IPO */
+ bActuator *act;
+ bActionActuator *aa;
+
+ for (act = ob->actuators.first; act; act = act->next) {
+ /* Any actuators set to ACT_IPO at this point are actually Action Actuators that
+ need this converted IPO to finish converting the actuator. */
+ if (act->type == ACT_IPO)
+ {
+ aa = (bActionActuator*)act->data;
+ aa->act = ob->adt->action;
+ act->type = ACT_ACTION;
+ }
+ }
+ }
}
}