diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-01-29 13:59:17 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-01-31 14:04:57 +0300 |
commit | 83f8f44791374dd051728e44d89fbdeee15c60aa (patch) | |
tree | addcd6991adfcf578bec05b022875c98509deda9 /source/blender/editors | |
parent | 7400aa7e595063510ce9f29fa1b02ebd3f9296e2 (diff) |
Fix T59495, T59992, T59904, T59178, T60598: broken keyframed value editing.
This removes a bunch of animation/driver evaluations and recalc flags that
should be redundant in the new depsgraph, and were incorrectly affecting
the evaluated scene in a permanent way.
Still two cases that could be removed if the depsgraph is improved, in
BKE_object_handle_data_update and BKE_cachefile_update_frame.
For physics subframe interpolation there are also still calls to
BKE_object_where_is_calc that should ideally be removed as well, though
they are not known to cause keyframing bugs.
Differential Revision: https://developer.blender.org/D4274
Diffstat (limited to 'source/blender/editors')
5 files changed, 5 insertions, 35 deletions
diff --git a/source/blender/editors/animation/anim_deps.c b/source/blender/editors/animation/anim_deps.c index b69d93aaacf..45ecf155a27 100644 --- a/source/blender/editors/animation/anim_deps.c +++ b/source/blender/editors/animation/anim_deps.c @@ -77,7 +77,6 @@ void ANIM_list_elem_update(Main *bmain, Scene *scene, bAnimListElem *ale) /* tag AnimData for refresh so that other views will update in realtime with these changes */ adt = BKE_animdata_from_id(id); if (adt) { - adt->recalc |= ADT_RECALC_ANIM; DEG_id_tag_update(id, ID_RECALC_ANIMATION); if (adt->action != NULL) { DEG_id_tag_update(&adt->action->id, ID_RECALC_COPY_ON_WRITE); @@ -117,13 +116,6 @@ void ANIM_list_elem_update(Main *bmain, Scene *scene, bAnimListElem *ale) void ANIM_id_update(Main *bmain, ID *id) { if (id) { - AnimData *adt = BKE_animdata_from_id(id); - - /* tag AnimData for refresh so that other views will update in realtime with these changes */ - if (adt) - adt->recalc |= ADT_RECALC_ANIM; - - /* set recalc flags */ DEG_id_tag_update_ex(bmain, id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION); // XXX or do we want something more restrictive? } } diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index e362eb535b8..3fdd770b008 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -1242,7 +1242,7 @@ static void object_pose_tag_update(Main *bmain, Object *ob) * Note that this is a bit wide here, since we cannot be sure whether there are some locked proxy bones * or not... * XXX Temp hack until new depsgraph hopefully solves this. */ - ob->adt->recalc |= ADT_RECALC_ANIM; + DEG_id_tag_update(&ob->id, ID_RECALC_ANIMATION); } } @@ -1856,7 +1856,7 @@ static int constraint_add_exec(bContext *C, wmOperator *op, Object *ob, ListBase /* We need to make use of ugly POSE_ANIMATION_WORKAROUND here too, else anim data are not reloaded * after calling `BKE_pose_rebuild()`, which causes T43872. * XXX Temp hack until new depsgraph hopefully solves this. */ - ob->adt->recalc |= ADT_RECALC_ANIM; + DEG_id_tag_update(&ob->id, ID_RECALC_ANIMATION); } DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY | ID_RECALC_TRANSFORM); } diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index 02ee1f9c360..23a7064b994 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -2190,23 +2190,8 @@ static int ocean_bake_exec(bContext *C, wmOperator *op) /* precalculate time variable before baking */ for (f = omd->bakestart; f <= omd->bakeend; f++) { - /* from physics_fluid.c: - * - * XXX: This can't be used due to an anim sys optimization that ignores recalc object animation, - * leaving it for the depgraph (this ignores object animation such as modifier properties though... :/ ) - * --> BKE_animsys_evaluate_all_animation(bmain, eval_time); - * This doesn't work with drivers: - * --> BKE_animsys_evaluate_animdata(&fsDomain->id, fsDomain->adt, eval_time, ADT_RECALC_ALL); - */ - - /* Modifying the global scene isn't nice, but we can do it in - * this part of the process before a threaded job is created */ - - //scene->r.cfra = f; - //ED_update_for_newframe(bmain, scene); - - /* ok, this doesn't work with drivers, but is way faster. - * let's use this for now and hope nobody wants to drive the time value... */ + /* For now only simple animation of time value is supported, nothing else. + * No drivers or other modifier parameters. */ BKE_animsys_evaluate_animdata(CTX_data_depsgraph(C), scene, (ID *)ob, ob->adt, f, ADT_RECALC_ANIM); och->time[i] = omd->time; diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c index 96d67398b2b..b864d9a2c52 100644 --- a/source/blender/editors/physics/physics_fluid.c +++ b/source/blender/editors/physics/physics_fluid.c @@ -399,13 +399,6 @@ static void fluid_init_all_channels(bContext *C, Object *UNUSED(fsDomain), Fluid eval_time = domainSettings->bakeStart + i; - /* XXX: This can't be used due to an anim sys optimization that ignores recalc object animation, - * leaving it for the depgraph (this ignores object animation such as modifier properties though... :/ ) - * --> BKE_animsys_evaluate_all_animation(CTX_data_main(C), eval_time); - * This doesn't work with drivers: - * --> BKE_animsys_evaluate_animdata(&fsDomain->id, fsDomain->adt, eval_time, ADT_RECALC_ALL); - */ - /* Modifying the global scene isn't nice, but we can do it in * this part of the process before a threaded job is created */ scene->r.cfra = (int)eval_time; diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index d3661cf60e1..75ecf766f85 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -5791,7 +5791,7 @@ static void ObjectToTransData(TransInfo *t, TransData *td, Object *ob) skip_invert = true; if (skip_invert == false && constinv == false) { - ob->transflag |= OB_NO_CONSTRAINTS; /* BKE_object_where_is_calc_time checks this */ + ob->transflag |= OB_NO_CONSTRAINTS; /* BKE_object_where_is_calc checks this */ BKE_object_where_is_calc(t->depsgraph, t->scene, ob); ob->transflag &= ~OB_NO_CONSTRAINTS; } |