diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-06-13 16:26:59 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-06-13 17:07:55 +0300 |
commit | 9c6522706125794201173207d0caecae0be0b484 (patch) | |
tree | 1d779a4262488cede1f5a2d85198aeefdf7d027c /source/blender/editors/mesh/editface.c | |
parent | c1e503e89a7c3b463a1ef9fb5845ab6588e3c9a6 (diff) |
Tag object/scene for selection update from operators
Before that depsgraph tagging was done from inside notifier listener in
viewport. This had the following issues:
- If there are no viewports, selection tag was not done. Causing possible
issues when object becomes visible.
- Required special trickery to detect which data to tag for update.
- Was causing crash when transforming/selecting markers in clip editor.
This is because selecting marker needed to poke viewport to redraw, since
selected bundles will be displayed differently in viewport.
Diffstat (limited to 'source/blender/editors/mesh/editface.c')
-rw-r--r-- | source/blender/editors/mesh/editface.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/mesh/editface.c b/source/blender/editors/mesh/editface.c index 7e31b6a3774..cf4d8ebf05d 100644 --- a/source/blender/editors/mesh/editface.c +++ b/source/blender/editors/mesh/editface.c @@ -52,6 +52,8 @@ #include "GPU_draw.h" +#include "DEG_depsgraph.h" + /* own include */ /* copy the face flags, most importantly selection from the mesh to the final derived mesh, @@ -382,6 +384,7 @@ bool paintface_mouse_select(struct bContext *C, Object *ob, const int mval[2], b /* image window redraw */ paintface_flush_flags(ob, SELECT); + DEG_id_tag_update(ob->data, DEG_TAG_SELECT_UPDATE); WM_event_add_notifier(C, NC_GEOM | ND_SELECT, ob->data); ED_region_tag_redraw(CTX_wm_region(C)); // XXX - should redraw all 3D views return true; |