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:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-12-06 19:52:37 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-12-07 13:37:38 +0300
commit79312c1912b4fdb830e38a856cf88bfca8e4703d (patch)
tree74d5b262de9cd5d044e1963df13f2cbe73c3b796 /source/blender/editors/animation
parent989fbff16f49204ca31a67f56f87c2221e0246f4 (diff)
Depsgraph: Remove duplicated sets of recalc/update flags
There were at least three copies of those: - OB_RECALC* family of flags, which are rudiment of an old dependency graph system. - PSYS_RECALC* which were used by old dependency graph system as a separate set since the graph itself did not handle particle systems. - DEG_TAG_* which was used to tag IDs. Now there is a single set, which defines what can be tagged and queried for an update. It also has some aggregate flags to make queries simpler. Lets once and for all solve the madness of those flags, stick to a single set, which will not overlap with anything or require any extra conversion. Technically, shouldn't be measurable user difference, but some of the agregate flags for few dependency graph components did change. Fixes T58632: Particle don't update rotation settings
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c6
-rw-r--r--source/blender/editors/animation/anim_deps.c10
-rw-r--r--source/blender/editors/animation/anim_markers.c2
-rw-r--r--source/blender/editors/animation/drivers.c4
-rw-r--r--source/blender/editors/animation/keyframing.c14
-rw-r--r--source/blender/editors/animation/keyingsets.c4
6 files changed, 20 insertions, 20 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index 8896de75472..9bd7e277098 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -4055,7 +4055,7 @@ static void achannel_setting_flush_widget_cb(bContext *C, void *ale_npoin, void
/* draw cache updates for settings that affect the visible strokes */
if (setting == ACHANNEL_SETTING_VISIBLE) {
bGPdata *gpd = (bGPdata *)ale_setting->id;
- DEG_id_tag_update(&gpd->id, OB_RECALC_OB | OB_RECALC_DATA);
+ DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
}
/* UI updates */
@@ -4064,11 +4064,11 @@ static void achannel_setting_flush_widget_cb(bContext *C, void *ale_npoin, void
/* tag copy-on-write flushing (so that the settings will have an effect) */
if (ale_setting->id) {
- DEG_id_tag_update(ale_setting->id, DEG_TAG_COPY_ON_WRITE);
+ DEG_id_tag_update(ale_setting->id, ID_RECALC_COPY_ON_WRITE);
}
if (ale_setting->adt && ale_setting->adt->action) {
/* action is it's own datablock, so has to be tagged specifically... */
- DEG_id_tag_update(&ale_setting->adt->action->id, DEG_TAG_COPY_ON_WRITE);
+ DEG_id_tag_update(&ale_setting->adt->action->id, ID_RECALC_COPY_ON_WRITE);
}
/* verify animation context */
diff --git a/source/blender/editors/animation/anim_deps.c b/source/blender/editors/animation/anim_deps.c
index c9b393601b2..b69d93aaacf 100644
--- a/source/blender/editors/animation/anim_deps.c
+++ b/source/blender/editors/animation/anim_deps.c
@@ -78,15 +78,15 @@ void ANIM_list_elem_update(Main *bmain, Scene *scene, bAnimListElem *ale)
adt = BKE_animdata_from_id(id);
if (adt) {
adt->recalc |= ADT_RECALC_ANIM;
- DEG_id_tag_update(id, OB_RECALC_TIME);
+ DEG_id_tag_update(id, ID_RECALC_ANIMATION);
if (adt->action != NULL) {
- DEG_id_tag_update(&adt->action->id, DEG_TAG_COPY_ON_WRITE);
+ DEG_id_tag_update(&adt->action->id, ID_RECALC_COPY_ON_WRITE);
}
}
/* Tag copy on the main object if updating anything directly inside AnimData */
if (ELEM(ale->type, ANIMTYPE_ANIMDATA, ANIMTYPE_NLAACTION, ANIMTYPE_NLATRACK, ANIMTYPE_NLACURVE)) {
- DEG_id_tag_update(id, DEG_TAG_TIME | DEG_TAG_COPY_ON_WRITE);
+ DEG_id_tag_update(id, ID_RECALC_ANIMATION | ID_RECALC_COPY_ON_WRITE);
return;
}
@@ -108,7 +108,7 @@ void ANIM_list_elem_update(Main *bmain, Scene *scene, bAnimListElem *ale)
else {
/* in other case we do standard depsgraph update, ideally
* we'd be calling property update functions here too ... */
- DEG_id_tag_update(id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); // XXX or do we want something more restrictive?
+ DEG_id_tag_update(id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION); // XXX or do we want something more restrictive?
}
}
@@ -124,7 +124,7 @@ void ANIM_id_update(Main *bmain, ID *id)
adt->recalc |= ADT_RECALC_ANIM;
/* set recalc flags */
- DEG_id_tag_update_ex(bmain, id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); // XXX or do we want something more restrictive?
+ 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/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c
index f82250df4d3..9144c0b3dcc 100644
--- a/source/blender/editors/animation/anim_markers.c
+++ b/source/blender/editors/animation/anim_markers.c
@@ -1201,7 +1201,7 @@ static int ed_marker_select(bContext *C, const wmEvent *event, bool extend, bool
}
}
- DEG_id_tag_update(&scene->id, DEG_TAG_SELECT_UPDATE);
+ DEG_id_tag_update(&scene->id, ID_RECALC_SELECT);
WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene);
}
#else
diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c
index 85e58521493..ac57f77bac9 100644
--- a/source/blender/editors/animation/drivers.c
+++ b/source/blender/editors/animation/drivers.c
@@ -944,7 +944,7 @@ static int add_driver_button_invoke(bContext *C, wmOperator *op, const wmEvent *
if (success) {
/* send updates */
UI_context_update_anim_flag(C);
- DEG_id_tag_update(ptr.id.data, DEG_TAG_COPY_ON_WRITE);
+ DEG_id_tag_update(ptr.id.data, ID_RECALC_COPY_ON_WRITE);
DEG_relations_tag_update(CTX_data_main(C));
WM_event_add_notifier(C, NC_ANIMATION | ND_FCURVES_ORDER, NULL);
}
@@ -1126,7 +1126,7 @@ static int paste_driver_button_exec(bContext *C, wmOperator *op)
UI_context_update_anim_flag(C);
DEG_relations_tag_update(CTX_data_main(C));
- DEG_id_tag_update(ptr.id.data, OB_RECALC_OB | OB_RECALC_DATA);
+ DEG_id_tag_update(ptr.id.data, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME_PROP, NULL); // XXX
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index 254569a345a..3e573d04d38 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -165,7 +165,7 @@ bAction *verify_adt_action(Main *bmain, ID *id, short add)
DEG_relations_tag_update(bmain);
}
- DEG_id_tag_update(&adt->action->id, DEG_TAG_COPY_ON_WRITE);
+ DEG_id_tag_update(&adt->action->id, ID_RECALC_COPY_ON_WRITE);
/* return the action */
return adt->action;
@@ -1178,10 +1178,10 @@ short insert_keyframe(
if (ret) {
if (act != NULL) {
- DEG_id_tag_update(&act->id, DEG_TAG_COPY_ON_WRITE);
+ DEG_id_tag_update(&act->id, ID_RECALC_COPY_ON_WRITE);
}
if (adt != NULL && adt->action != NULL && adt->action != act) {
- DEG_id_tag_update(&adt->action->id, DEG_TAG_COPY_ON_WRITE);
+ DEG_id_tag_update(&adt->action->id, ID_RECALC_COPY_ON_WRITE);
}
}
@@ -1306,7 +1306,7 @@ short delete_keyframe(Main *bmain, ReportList *reports, ID *id, bAction *act,
* about relations update, since it needs to get rid of animation operation
* for this datablock. */
if (ret && adt->action == NULL) {
- DEG_id_tag_update_ex(bmain, id, DEG_TAG_COPY_ON_WRITE);
+ DEG_id_tag_update_ex(bmain, id, ID_RECALC_COPY_ON_WRITE);
DEG_relations_tag_update(bmain);
}
/* return success/failure */
@@ -1402,7 +1402,7 @@ static short clear_keyframe(Main *bmain, ReportList *reports, ID *id, bAction *a
* about relations update, since it needs to get rid of animation operation
* for this datablock. */
if (ret && adt->action == NULL) {
- DEG_id_tag_update_ex(bmain, id, DEG_TAG_COPY_ON_WRITE);
+ DEG_id_tag_update_ex(bmain, id, ID_RECALC_COPY_ON_WRITE);
DEG_relations_tag_update(bmain);
}
/* return success/failure */
@@ -1731,7 +1731,7 @@ static int clear_anim_v3d_exec(bContext *C, wmOperator *UNUSED(op))
/* delete F-Curve completely */
if (can_delete) {
ANIM_fcurve_delete_from_animdata(NULL, adt, fcu);
- DEG_id_tag_update(&ob->id, OB_RECALC_OB);
+ DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM);
changed = true;
}
}
@@ -1838,7 +1838,7 @@ static int delete_key_v3d_exec(bContext *C, wmOperator *op)
else
BKE_reportf(op->reports, RPT_ERROR, "No keyframes removed from Object '%s'", id->name + 2);
- DEG_id_tag_update(&ob->id, OB_RECALC_OB);
+ DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM);
}
CTX_DATA_END;
diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c
index d8e9c5a7790..1fe8a34d166 100644
--- a/source/blender/editors/animation/keyingsets.c
+++ b/source/blender/editors/animation/keyingsets.c
@@ -1051,11 +1051,11 @@ int ANIM_apply_keyingset(bContext *C, ListBase *dsources, bAction *act, KeyingSe
Object *ob = (Object *)ksp->id;
// XXX: only object transforms?
- DEG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA);
+ DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
break;
}
default:
- DEG_id_tag_update(ksp->id, DEG_TAG_COPY_ON_WRITE);
+ DEG_id_tag_update(ksp->id, ID_RECALC_COPY_ON_WRITE);
break;
}