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/space_view3d/view3d_snap.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/space_view3d/view3d_snap.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_snap.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c index a220257c63f..1bff52e7950 100644 --- a/source/blender/editors/space_view3d/view3d_snap.c +++ b/source/blender/editors/space_view3d/view3d_snap.c @@ -180,7 +180,7 @@ static int snap_sel_to_grid_exec(bContext *C, wmOperator *UNUSED(op)) } ob->pose->flag |= (POSE_LOCKED | POSE_DO_UNLOCK); - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); } else { vec[0] = -ob_eval->obmat[3][0] + gridf * floorf(0.5f + ob_eval->obmat[3][0] / gridf); @@ -204,7 +204,7 @@ static int snap_sel_to_grid_exec(bContext *C, wmOperator *UNUSED(op)) /* auto-keyframing */ ED_autokeyframe_object(C, scene, ob, ks); - DEG_id_tag_update(&ob->id, OB_RECALC_OB); + DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM); } } FOREACH_SELECTED_EDITABLE_OBJECT_END; @@ -379,7 +379,7 @@ static int snap_selected_to_location(bContext *C, const float snap_target_global ob->pose->flag |= (POSE_LOCKED | POSE_DO_UNLOCK); - DEG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); } CTX_DATA_END; } @@ -437,7 +437,7 @@ static int snap_selected_to_location(bContext *C, const float snap_target_global /* auto-keyframing */ ED_autokeyframe_object(C, scene, ob, ks); - DEG_id_tag_update(&ob->id, OB_RECALC_OB); + DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM); } } @@ -527,7 +527,7 @@ static int snap_curs_to_grid_exec(bContext *C, wmOperator *UNUSED(op)) curs[2] = gridf * floorf(0.5f + curs[2] / gridf); WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, v3d); /* hrm */ - DEG_id_tag_update(&scene->id, DEG_TAG_COPY_ON_WRITE); + DEG_id_tag_update(&scene->id, ID_RECALC_COPY_ON_WRITE); return OPERATOR_FINISHED; } @@ -725,7 +725,7 @@ static int snap_curs_to_sel_exec(bContext *C, wmOperator *UNUSED(op)) Scene *scene = CTX_data_scene(C); if (snap_curs_to_sel_ex(C, scene->cursor.location)) { WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, NULL); - DEG_id_tag_update(&scene->id, DEG_TAG_COPY_ON_WRITE); + DEG_id_tag_update(&scene->id, ID_RECALC_COPY_ON_WRITE); return OPERATOR_FINISHED; } @@ -802,7 +802,7 @@ static int snap_curs_to_active_exec(bContext *C, wmOperator *UNUSED(op)) if (snap_calc_active_center(C, false, scene->cursor.location)) { WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, v3d); - DEG_id_tag_update(&scene->id, DEG_TAG_COPY_ON_WRITE); + DEG_id_tag_update(&scene->id, ID_RECALC_COPY_ON_WRITE); return OPERATOR_FINISHED; } @@ -835,7 +835,7 @@ static int snap_curs_to_center_exec(bContext *C, wmOperator *UNUSED(op)) zero_v3(scene->cursor.location); - DEG_id_tag_update(&scene->id, DEG_TAG_COPY_ON_WRITE); + DEG_id_tag_update(&scene->id, ID_RECALC_COPY_ON_WRITE); WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, NULL); return OPERATOR_FINISHED; |