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>2009-02-09 18:50:09 +0300
committerTon Roosendaal <ton@blender.org>2009-02-09 18:50:09 +0300
commitf33309b0285079c14a8f9fc913157129ff6cbc81 (patch)
treea9a1e7dd869b8c09a8e8c1411bf995ddeb5703c3 /source/blender/blenkernel/intern/anim_sys.c
parentc58d336a33b4105530af326dccef077ba0274fa6 (diff)
2.5
- Added depsgraph tag for object-change in AnimData, so the new animsys doesn't have to all objects anymore. (Still WIP, depsgraph has to do this much better) - Bugfix in notifiers; only 1 notifier was handled for frame updates Result: 2 windows, displaying 2 scenes, now can be edited independently, and play independent. Not when they share data, of course. :)
Diffstat (limited to 'source/blender/blenkernel/intern/anim_sys.c')
-rw-r--r--source/blender/blenkernel/intern/anim_sys.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c
index 8bc914d5be0..a7e65a9c585 100644
--- a/source/blender/blenkernel/intern/anim_sys.c
+++ b/source/blender/blenkernel/intern/anim_sys.c
@@ -587,7 +587,7 @@ void BKE_animsys_evaluate_animdata (ID *id, AnimData *adt, float ctime, short re
* - NLA before Active Action, as Active Action behaves as 'tweaking track'
* that overrides 'rough' work in NLA
*/
- if ((recalc & ADT_RECALC_ANIM) /*|| (adt->recalc & ADT_RECALC_ANIM)*/) // XXX for now,don't check yet, as depsgraph doesn't know this yet
+ if ((recalc & ADT_RECALC_ANIM) || (adt->recalc & ADT_RECALC_ANIM))
{
/* evaluate NLA data */
if ((adt->nla_tracks.first) && !(adt->flag & ADT_NLA_EVAL_OFF))
@@ -599,6 +599,9 @@ void BKE_animsys_evaluate_animdata (ID *id, AnimData *adt, float ctime, short re
// FIXME: what if the solo track was not tweaking one, then nla-solo should be checked too?
if (adt->action)
animsys_evaluate_action(&id_ptr, adt->action, adt->remap, ctime);
+
+ /* reset tag */
+ adt->recalc &= ~ADT_RECALC_ANIM;
}
/* recalculate drivers
@@ -639,29 +642,29 @@ void BKE_animsys_evaluate_all_animation (Main *main, float ctime)
printf("Evaluate all animation - %f \n", ctime);
/* macro for less typing */
-#define EVAL_ANIM_IDS(first) \
+#define EVAL_ANIM_IDS(first, flag) \
for (id= first; id; id= id->next) { \
AnimData *adt= BKE_animdata_from_id(id); \
- BKE_animsys_evaluate_animdata(id, adt, ctime, ADT_RECALC_ANIM); \
+ BKE_animsys_evaluate_animdata(id, adt, ctime, flag); \
}
/* nodes */
// TODO...
/* textures */
- EVAL_ANIM_IDS(main->tex.first);
+ EVAL_ANIM_IDS(main->tex.first, ADT_RECALC_ANIM);
/* lamps */
- EVAL_ANIM_IDS(main->lamp.first);
+ EVAL_ANIM_IDS(main->lamp.first, ADT_RECALC_ANIM);
/* materials */
- EVAL_ANIM_IDS(main->mat.first);
+ EVAL_ANIM_IDS(main->mat.first, ADT_RECALC_ANIM);
/* cameras */
- EVAL_ANIM_IDS(main->camera.first);
+ EVAL_ANIM_IDS(main->camera.first, ADT_RECALC_ANIM);
/* shapekeys */
- EVAL_ANIM_IDS(main->key.first);
+ EVAL_ANIM_IDS(main->key.first, ADT_RECALC_ANIM);
/* curves */
// TODO...
@@ -670,13 +673,13 @@ void BKE_animsys_evaluate_all_animation (Main *main, float ctime)
// TODO...
/* objects */
- EVAL_ANIM_IDS(main->object.first);
+ EVAL_ANIM_IDS(main->object.first, 0);
/* worlds */
- EVAL_ANIM_IDS(main->world.first);
+ EVAL_ANIM_IDS(main->world.first, ADT_RECALC_ANIM);
/* scenes */
- EVAL_ANIM_IDS(main->scene.first);
+ EVAL_ANIM_IDS(main->scene.first, ADT_RECALC_ANIM);
}
/* ***************************************** */