Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-06-13 16:26:59 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-06-13 17:07:55 +0300
commit9c6522706125794201173207d0caecae0be0b484 (patch)
tree1d779a4262488cede1f5a2d85198aeefdf7d027c /source/blender/editors/metaball
parentc1e503e89a7c3b463a1ef9fb5845ab6588e3c9a6 (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/metaball')
-rw-r--r--source/blender/editors/metaball/mball_edit.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/metaball/mball_edit.c b/source/blender/editors/metaball/mball_edit.c
index 65bf258f334..aea125ce4b9 100644
--- a/source/blender/editors/metaball/mball_edit.c
+++ b/source/blender/editors/metaball/mball_edit.c
@@ -154,6 +154,7 @@ static int mball_select_all_exec(bContext *C, wmOperator *op)
break;
}
+ DEG_id_tag_update(&mb->id, DEG_TAG_SELECT_UPDATE);
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, mb);
return OPERATOR_FINISHED;
@@ -335,6 +336,7 @@ static int mball_select_similar_exec(bContext *C, wmOperator *op)
}
if (changed) {
+ DEG_id_tag_update(&mb->id, DEG_TAG_SELECT_UPDATE);
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, mb);
}
@@ -403,6 +405,7 @@ static int select_random_metaelems_exec(bContext *C, wmOperator *op)
BLI_rng_free(rng);
+ DEG_id_tag_update(&mb->id, DEG_TAG_SELECT_UPDATE);
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, mb);
}
MEM_freeN(objects);
@@ -670,6 +673,7 @@ bool ED_mball_select_pick(bContext *C, const int mval[2], bool extend, bool dese
mb->lastelem = ml_act;
+ DEG_id_tag_update(&mb->id, DEG_TAG_SELECT_UPDATE);
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, mb);
return true;