Depsgraph: Tag scene after changing cursor location

While 3d cursor is mainly an UI thing and isn't needed for scene evaluation,
it is stored in scene DNA. This means, operator is inform depsgraph that data
has changed, so all copies of that scene can copy new values.

Fixes lack of visual feedback when changing cursor location in viewport
with copy-on-write enabled.
This commit is contained in:
Sergey Sharybin 2018-04-16 12:56:39 +02:00
parent cab5dd5ea0
commit 6a75a1a669
1 changed files with 2 additions and 0 deletions

View File

@ -4604,6 +4604,8 @@ void ED_view3d_cursor3d_update(bContext *C, const int mval[2])
WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, v3d);
else
WM_event_add_notifier(C, NC_SCENE | NA_EDITED, scene);
DEG_id_tag_update(&scene->id, DEG_TAG_COPY_ON_WRITE);
}
static int view3d_cursor3d_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *event)