diff options
Diffstat (limited to 'source/blender/editors/metaball/mball_edit.c')
-rw-r--r-- | source/blender/editors/metaball/mball_edit.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/source/blender/editors/metaball/mball_edit.c b/source/blender/editors/metaball/mball_edit.c index bc42717b69f..47d354ac72a 100644 --- a/source/blender/editors/metaball/mball_edit.c +++ b/source/blender/editors/metaball/mball_edit.c @@ -48,10 +48,11 @@ #include "RNA_define.h" #include "RNA_access.h" -#include "BKE_depsgraph.h" #include "BKE_context.h" #include "BKE_mball.h" +#include "DEG_depsgraph.h" + #include "ED_mball.h" #include "ED_screen.h" #include "ED_view3d.h" @@ -433,7 +434,7 @@ static int duplicate_metaelems_exec(bContext *C, wmOperator *UNUSED(op)) ml = ml->prev; } WM_event_add_notifier(C, NC_GEOM | ND_DATA, mb); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); } return OPERATOR_FINISHED; @@ -475,7 +476,7 @@ static int delete_metaelems_exec(bContext *C, wmOperator *UNUSED(op)) ml = next; } WM_event_add_notifier(C, NC_GEOM | ND_DATA, mb); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); } return OPERATOR_FINISHED; @@ -515,7 +516,7 @@ static int hide_metaelems_exec(bContext *C, wmOperator *op) ml = ml->next; } WM_event_add_notifier(C, NC_GEOM | ND_DATA, mb); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); } return OPERATOR_FINISHED; @@ -556,7 +557,7 @@ static int reveal_metaelems_exec(bContext *C, wmOperator *UNUSED(op)) ml = ml->next; } WM_event_add_notifier(C, NC_GEOM | ND_DATA, mb); - DAG_id_tag_update(obedit->data, 0); + DEG_id_tag_update(obedit->data, 0); } return OPERATOR_FINISHED; @@ -583,6 +584,7 @@ bool ED_mball_select_pick(bContext *C, const int mval[2], bool extend, bool dese { static MetaElem *startelem = NULL; Object *obedit = CTX_data_edit_object(C); + EvaluationContext eval_ctx; ViewContext vc; MetaBall *mb = (MetaBall *)obedit->data; MetaElem *ml, *ml_act = NULL; @@ -590,11 +592,12 @@ bool ED_mball_select_pick(bContext *C, const int mval[2], bool extend, bool dese unsigned int buffer[MAXPICKBUF]; rcti rect; + CTX_data_eval_ctx(C, &eval_ctx); view3d_set_viewcontext(C, &vc); BLI_rcti_init_pt_radius(&rect, mval, 12); - hits = view3d_opengl_select(&vc, buffer, MAXPICKBUF, &rect, VIEW3D_SELECT_PICK_NEAREST); + hits = view3d_opengl_select(&eval_ctx, &vc, buffer, MAXPICKBUF, &rect, VIEW3D_SELECT_PICK_NEAREST); /* does startelem exist? */ ml = mb->editelems->first; |