diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-12-06 19:52:37 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-12-07 13:37:38 +0300 |
commit | 79312c1912b4fdb830e38a856cf88bfca8e4703d (patch) | |
tree | 74d5b262de9cd5d044e1963df13f2cbe73c3b796 /source/blender/editors/physics/particle_boids.c | |
parent | 989fbff16f49204ca31a67f56f87c2221e0246f4 (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/physics/particle_boids.c')
-rw-r--r-- | source/blender/editors/physics/particle_boids.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/physics/particle_boids.c b/source/blender/editors/physics/particle_boids.c index f1e0fd39014..9f85ed08244 100644 --- a/source/blender/editors/physics/particle_boids.c +++ b/source/blender/editors/physics/particle_boids.c @@ -77,7 +77,7 @@ static int rule_add_exec(bContext *C, wmOperator *op) BLI_addtail(&state->rules, rule); - DEG_id_tag_update(&part->id, OB_RECALC_DATA | PSYS_RECALC_RESET); + DEG_id_tag_update(&part->id, ID_RECALC_GEOMETRY | ID_RECALC_PSYS_RESET); return OPERATOR_FINISHED; } @@ -124,7 +124,7 @@ static int rule_del_exec(bContext *C, wmOperator *UNUSED(op)) rule->flag |= BOIDRULE_CURRENT; DEG_relations_tag_update(bmain); - DEG_id_tag_update(&part->id, OB_RECALC_DATA | PSYS_RECALC_RESET); + DEG_id_tag_update(&part->id, ID_RECALC_GEOMETRY | ID_RECALC_PSYS_RESET); return OPERATOR_FINISHED; } @@ -160,7 +160,7 @@ static int rule_move_up_exec(bContext *C, wmOperator *UNUSED(op)) BLI_remlink(&state->rules, rule); BLI_insertlinkbefore(&state->rules, rule->prev, rule); - DEG_id_tag_update(&part->id, OB_RECALC_DATA | PSYS_RECALC_RESET); + DEG_id_tag_update(&part->id, ID_RECALC_GEOMETRY | ID_RECALC_PSYS_RESET); break; } } @@ -196,7 +196,7 @@ static int rule_move_down_exec(bContext *C, wmOperator *UNUSED(op)) BLI_remlink(&state->rules, rule); BLI_insertlinkafter(&state->rules, rule->next, rule); - DEG_id_tag_update(&part->id, OB_RECALC_DATA | PSYS_RECALC_RESET); + DEG_id_tag_update(&part->id, ID_RECALC_GEOMETRY | ID_RECALC_PSYS_RESET); break; } } @@ -280,7 +280,7 @@ static int state_del_exec(bContext *C, wmOperator *UNUSED(op)) state->flag |= BOIDSTATE_CURRENT; DEG_relations_tag_update(bmain); - DEG_id_tag_update(&part->id, OB_RECALC_DATA | PSYS_RECALC_RESET); + DEG_id_tag_update(&part->id, ID_RECALC_GEOMETRY | ID_RECALC_PSYS_RESET); return OPERATOR_FINISHED; } @@ -351,7 +351,7 @@ static int state_move_down_exec(bContext *C, wmOperator *UNUSED(op)) if (state->flag & BOIDSTATE_CURRENT && state->next) { BLI_remlink(&boids->states, state); BLI_insertlinkafter(&boids->states, state->next, state); - DEG_id_tag_update(&part->id, OB_RECALC_DATA | PSYS_RECALC_RESET); + DEG_id_tag_update(&part->id, ID_RECALC_GEOMETRY | ID_RECALC_PSYS_RESET); break; } } |