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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-12-05 21:59:23 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-12-05 21:59:23 +0300
commitb110c7c8f2c5fafa6412e01d21d751a884bfe8b2 (patch)
treec414d8b62a65c8d633625498dd36740548605c4c /source/blender/editors/object
parent07692fc59b1837da7510e46c37d0deed85924a52 (diff)
Dependency graph: changed DAG_id_flush_update to DAG_id_tag_update. Now it
only tags the ID and does the actual flush/update delayed, before the next redraw. For objects the update was already delayed, just flushing wasn't yet. This should help performance in python and animation editors, by making calls to RNA property update quicker. Still need to add calls in a few places where this was previously avoided due to bad performance.
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r--source/blender/editors/object/object_add.c8
-rw-r--r--source/blender/editors/object/object_constraint.c14
-rw-r--r--source/blender/editors/object/object_edit.c18
-rw-r--r--source/blender/editors/object/object_hook.c8
-rw-r--r--source/blender/editors/object/object_lattice.c2
-rw-r--r--source/blender/editors/object/object_modifier.c24
-rw-r--r--source/blender/editors/object/object_relations.c2
-rw-r--r--source/blender/editors/object/object_shapekey.c8
-rw-r--r--source/blender/editors/object/object_transform.c8
-rw-r--r--source/blender/editors/object/object_vgroup.c32
10 files changed, 62 insertions, 62 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index 664e2d5eda3..58985a97a72 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -506,7 +506,7 @@ static int object_metaball_add_exec(bContext *C, wmOperator *op)
obedit= ED_object_add_type(C, OB_MBALL, loc, rot, TRUE, layer);
newob = 1;
}
- else DAG_id_flush_update(&obedit->id, OB_RECALC_DATA);
+ else DAG_id_tag_update(&obedit->id, OB_RECALC_DATA);
ED_object_new_primitive_matrix(C, obedit, loc, rot, mat);
@@ -617,7 +617,7 @@ static int object_armature_add_exec(bContext *C, wmOperator *op)
ED_object_enter_editmode(C, 0);
newob = 1;
}
- else DAG_id_flush_update(&obedit->id, OB_RECALC_DATA);
+ else DAG_id_tag_update(&obedit->id, OB_RECALC_DATA);
if(obedit==NULL) {
BKE_report(op->reports, RPT_ERROR, "Cannot create editmode armature.");
@@ -1309,7 +1309,7 @@ static int convert_exec(bContext *C, wmOperator *op)
}
if (!keep_original) {
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
}
/* delete original if needed */
@@ -1659,7 +1659,7 @@ static int duplicate_exec(bContext *C, wmOperator *op)
if(BASACT==base)
ED_base_object_activate(C, basen);
- DAG_id_flush_update(base->object->data, 0);
+ DAG_id_tag_update(base->object->data, 0);
}
CTX_DATA_END;
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c
index d5ca7f0f89e..7e44442d867 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -784,8 +784,8 @@ void ED_object_constraint_update(Object *ob)
object_test_constraints(ob);
- if(ob->type==OB_ARMATURE) DAG_id_flush_update(&ob->id, OB_RECALC_DATA|OB_RECALC_OB);
- else DAG_id_flush_update(&ob->id, OB_RECALC_OB);
+ if(ob->type==OB_ARMATURE) DAG_id_tag_update(&ob->id, OB_RECALC_DATA|OB_RECALC_OB);
+ else DAG_id_tag_update(&ob->id, OB_RECALC_OB);
}
void ED_object_constraint_dependency_update(Main *bmain, Scene *scene, Object *ob)
@@ -958,7 +958,7 @@ static int pose_constraints_clear_exec(bContext *C, wmOperator *UNUSED(op))
DAG_scene_sort(bmain, scene); /* sort order of objects */
/* do updates */
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT, ob);
return OPERATOR_FINISHED;
@@ -986,7 +986,7 @@ static int object_constraints_clear_exec(bContext *C, wmOperator *UNUSED(op))
CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects)
{
free_constraints(&ob->constraints);
- DAG_id_flush_update(&ob->id, OB_RECALC_OB);
+ DAG_id_tag_update(&ob->id, OB_RECALC_OB);
}
CTX_DATA_END;
@@ -1336,10 +1336,10 @@ static int constraint_add_exec(bContext *C, wmOperator *op, Object *ob, ListBase
if ((ob->type==OB_ARMATURE) && (pchan)) {
ob->pose->flag |= POSE_RECALC; /* sort pose channels */
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA|OB_RECALC_OB);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA|OB_RECALC_OB);
}
else
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
/* notifiers for updates */
WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT|NA_ADDED, ob);
@@ -1579,7 +1579,7 @@ static int pose_ik_clear_exec(bContext *C, wmOperator *UNUSED(op))
CTX_DATA_END;
/* refresh depsgraph */
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
/* note, notifier might evolve */
WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT|NA_REMOVED, ob);
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 11084c2c0d1..2c0f232b03c 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -371,7 +371,7 @@ void ED_object_exit_editmode(bContext *C, int flag)
BKE_ptcache_object_reset(scene, obedit, PTCACHE_RESET_OUTDATED);
/* also flush ob recalc, doesn't take much overhead, but used for particles */
- DAG_id_flush_update(&obedit->id, OB_RECALC_OB|OB_RECALC_DATA);
+ DAG_id_tag_update(&obedit->id, OB_RECALC_OB|OB_RECALC_DATA);
if(flag & EM_DO_UNDO)
ED_undo_push(C, "Editmode");
@@ -460,7 +460,7 @@ void ED_object_enter_editmode(bContext *C, int flag)
scene->obedit= ob;
ED_armature_to_edit(ob);
/* to ensure all goes in restposition and without striding */
- DAG_id_flush_update(&ob->id, OB_RECALC_ALL); // XXX: should this be OB_RECALC_DATA?
+ DAG_id_tag_update(&ob->id, OB_RECALC_ALL); // XXX: should this be OB_RECALC_DATA?
WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_EDITMODE_ARMATURE, scene);
}
@@ -494,7 +494,7 @@ void ED_object_enter_editmode(bContext *C, int flag)
}
if(ok) {
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
}
else {
scene->obedit= NULL; // XXX for context
@@ -777,7 +777,7 @@ void special_editmenu(Scene *scene, View3D *v3d)
}
}
}
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
}
else if(ob->mode & OB_MODE_VERTEX_PAINT) {
Mesh *me= get_mesh(ob);
@@ -789,7 +789,7 @@ void special_editmenu(Scene *scene, View3D *v3d)
// XXX do_shared_vertexcol(me);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
}
}
else if(ob->mode & OB_MODE_WEIGHT_PAINT) {
@@ -836,7 +836,7 @@ void special_editmenu(Scene *scene, View3D *v3d)
break;
}
- DAG_id_flush_update(&obedit->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&obedit->id, OB_RECALC_DATA);
if(nr>0) waitcursor(0);
#endif
@@ -1621,7 +1621,7 @@ static int shade_smooth_exec(bContext *C, wmOperator *op)
if(ob->type==OB_MESH) {
mesh_set_smooth_flag(ob, !clear);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
done= 1;
@@ -1634,7 +1634,7 @@ static int shade_smooth_exec(bContext *C, wmOperator *op)
else nu->flag &= ~ME_SMOOTH;
}
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
done= 1;
@@ -1726,7 +1726,7 @@ void image_aspect(Scene *scene, View3D *v3d)
else ob->size[1]= ob->size[0]*y/x;
done= 1;
- DAG_id_flush_update(&ob->id, OB_RECALC_OB);
+ DAG_id_tag_update(&ob->id, OB_RECALC_OB);
}
}
if(done) break;
diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c
index ee7164046ce..e04ec43dace 100644
--- a/source/blender/editors/object/object_hook.c
+++ b/source/blender/editors/object/object_hook.c
@@ -551,7 +551,7 @@ static int object_hook_remove_exec(bContext *C, wmOperator *op)
BLI_remlink(&ob->modifiers, (ModifierData *)hmd);
modifier_free((ModifierData *)hmd);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
return OPERATOR_FINISHED;
@@ -646,7 +646,7 @@ static int object_hook_reset_exec(bContext *C, wmOperator *op)
}
}
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
return OPERATOR_FINISHED;
@@ -702,7 +702,7 @@ static int object_hook_recenter_exec(bContext *C, wmOperator *op)
sub_v3_v3v3(hmd->cent, scene->cursor, ob->obmat[3]);
mul_m3_v3(imat, hmd->cent);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
return OPERATOR_FINISHED;
@@ -765,7 +765,7 @@ static int object_hook_assign_exec(bContext *C, wmOperator *op)
hmd->indexar= indexar;
hmd->totindex= tot;
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
return OPERATOR_FINISHED;
diff --git a/source/blender/editors/object/object_lattice.c b/source/blender/editors/object/object_lattice.c
index 22d1a2f6b9d..2eefad06d2f 100644
--- a/source/blender/editors/object/object_lattice.c
+++ b/source/blender/editors/object/object_lattice.c
@@ -274,7 +274,7 @@ int make_regular_exec(bContext *C, wmOperator *UNUSED(op))
resizelattice(lt, lt->pntsu, lt->pntsv, lt->pntsw, NULL);
}
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
return OPERATOR_FINISHED;
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index 6c7b57a0b69..cf34e885592 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -137,7 +137,7 @@ ModifierData *ED_object_modifier_add(ReportList *reports, Main *bmain, Scene *sc
multiresModifier_set_levels_from_disps((MultiresModifierData *)new_md, ob);
}
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
return new_md;
}
@@ -204,7 +204,7 @@ int ED_object_modifier_remove(ReportList *reports, Main *bmain, Scene *scene, Ob
BLI_remlink(&ob->modifiers, md);
modifier_free(md);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
/* sorting has to be done after the update so that dynamic systems can react properly */
if(sort_depsgraph)
@@ -465,7 +465,7 @@ static int modifier_apply_obdata(ReportList *reports, Scene *scene, Object *ob,
MEM_freeN(vertexCos);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
}
else {
BKE_report(reports, RPT_ERROR, "Cannot apply modifier for this object type");
@@ -713,7 +713,7 @@ static int modifier_move_up_exec(bContext *C, wmOperator *op)
if(!ob || !md || !ED_object_modifier_move_up(op->reports, ob, md))
return OPERATOR_CANCELLED;
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
return OPERATOR_FINISHED;
@@ -752,7 +752,7 @@ static int modifier_move_down_exec(bContext *C, wmOperator *op)
if(!ob || !md || !ED_object_modifier_move_down(op->reports, ob, md))
return OPERATOR_CANCELLED;
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
return OPERATOR_FINISHED;
@@ -794,7 +794,7 @@ static int modifier_apply_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
return OPERATOR_FINISHED;
@@ -842,7 +842,7 @@ static int modifier_convert_exec(bContext *C, wmOperator *op)
if(!ob || !md || !ED_object_modifier_convert(op->reports, bmain, scene, ob, md))
return OPERATOR_CANCELLED;
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
return OPERATOR_FINISHED;
@@ -881,7 +881,7 @@ static int modifier_copy_exec(bContext *C, wmOperator *op)
if(!ob || !md || !ED_object_modifier_copy(op->reports, ob, md))
return OPERATOR_CANCELLED;
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
return OPERATOR_FINISHED;
@@ -966,7 +966,7 @@ static int multires_subdivide_exec(bContext *C, wmOperator *op)
multiresModifier_subdivide(mmd, ob, 0, mmd->simple);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
return OPERATOR_FINISHED;
@@ -1024,7 +1024,7 @@ static int multires_reshape_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
return OPERATOR_FINISHED;
@@ -1191,7 +1191,7 @@ static int meshdeform_bind_exec(bContext *C, wmOperator *op)
mmd->totcagevert= 0;
mmd->totinfluence= 0;
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
}
else {
@@ -1265,7 +1265,7 @@ static int explode_refresh_exec(bContext *C, wmOperator *op)
emd->flag |= eExplodeFlag_CalcFaces;
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
return OPERATOR_FINISHED;
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index 7ccbc86a20d..5f1e9b43990 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -343,7 +343,7 @@ static int make_proxy_exec (bContext *C, wmOperator *op)
/* depsgraph flushes are needed for the new data */
DAG_scene_sort(bmain, scene);
- DAG_id_flush_update(&newob->id, OB_RECALC_ALL);
+ DAG_id_tag_update(&newob->id, OB_RECALC_ALL);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, newob);
}
else {
diff --git a/source/blender/editors/object/object_shapekey.c b/source/blender/editors/object/object_shapekey.c
index 0aefb09ee9e..db58965fbcf 100644
--- a/source/blender/editors/object/object_shapekey.c
+++ b/source/blender/editors/object/object_shapekey.c
@@ -155,7 +155,7 @@ static int ED_object_shape_key_remove(bContext *C, Object *ob)
free_libblock_us(&(bmain->key), key);
}
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
return 1;
@@ -216,7 +216,7 @@ static int object_shape_key_mirror(bContext *C, Object *ob)
MEM_freeN(tag_elem);
}
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
return 1;
@@ -304,7 +304,7 @@ static int shape_key_clear_exec(bContext *C, wmOperator *UNUSED(op))
for(kb=key->block.first; kb; kb=kb->next)
kb->curval= 0.0f;
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
return OPERATOR_FINISHED;
@@ -392,7 +392,7 @@ static int shape_key_move_exec(bContext *C, wmOperator *op)
}
}
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
return OPERATOR_FINISHED;
diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c
index 2917de2864b..1792cabd5f6 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -557,7 +557,7 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
where_is_object(scene, ob);
ignore_parent_tx(bmain, scene, ob);
- DAG_id_flush_update(&ob->id, OB_RECALC_OB|OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_OB|OB_RECALC_DATA);
change = 1;
}
@@ -581,7 +581,7 @@ static int visual_transform_apply_exec(bContext *C, wmOperator *UNUSED(op))
where_is_object(scene, ob);
/* update for any children that may get moved */
- DAG_id_flush_update(&ob->id, OB_RECALC_OB);
+ DAG_id_tag_update(&ob->id, OB_RECALC_OB);
change = 1;
}
@@ -780,7 +780,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
recalc_editnormals(em);
tot_change++;
- DAG_id_flush_update(&obedit->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&obedit->id, OB_RECALC_DATA);
BKE_mesh_end_editmesh(me, em);
}
}
@@ -872,7 +872,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
if(obedit) {
if (centermode == GEOMETRY_TO_ORIGIN) {
- DAG_id_flush_update(&obedit->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&obedit->id, OB_RECALC_DATA);
}
break;
}
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c
index 693a8e9b0e7..52a7810d791 100644
--- a/source/blender/editors/object/object_vgroup.c
+++ b/source/blender/editors/object/object_vgroup.c
@@ -1434,7 +1434,7 @@ static int vertex_group_add_exec(bContext *C, wmOperator *UNUSED(op))
Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
ED_vgroup_add(ob);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
@@ -1464,7 +1464,7 @@ static int vertex_group_remove_exec(bContext *C, wmOperator *op)
else
vgroup_delete(ob);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
@@ -1497,7 +1497,7 @@ static int vertex_group_assign_exec(bContext *C, wmOperator *op)
ED_vgroup_add(ob);
vgroup_assign_verts(ob, ts->vgroup_weight);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
return OPERATOR_FINISHED;
@@ -1529,7 +1529,7 @@ static int vertex_group_remove_from_exec(bContext *C, wmOperator *op)
else
vgroup_active_remove_verts(ob, 0);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
return OPERATOR_FINISHED;
@@ -1608,7 +1608,7 @@ static int vertex_group_copy_exec(bContext *C, wmOperator *UNUSED(op))
Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
vgroup_duplicate(ob);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
@@ -1638,7 +1638,7 @@ static int vertex_group_levels_exec(bContext *C, wmOperator *op)
vgroup_levels(ob, offset, gain);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
@@ -1668,7 +1668,7 @@ static int vertex_group_normalize_exec(bContext *C, wmOperator *UNUSED(op))
vgroup_normalize(ob);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
@@ -1696,7 +1696,7 @@ static int vertex_group_normalize_all_exec(bContext *C, wmOperator *op)
vgroup_normalize_all(ob, lock_active);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
@@ -1726,7 +1726,7 @@ static int vertex_group_invert_exec(bContext *C, wmOperator *op)
int auto_remove= RNA_boolean_get(op->ptr,"auto_remove");
vgroup_invert(ob, auto_assign, auto_remove);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
@@ -1757,7 +1757,7 @@ static int vertex_group_blend_exec(bContext *C, wmOperator *UNUSED(op))
vgroup_blend(ob);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
@@ -1791,7 +1791,7 @@ static int vertex_group_clean_exec(bContext *C, wmOperator *op)
if(all_groups) vgroup_clean_all(ob, limit, keep_single);
else vgroup_clean(ob, limit, keep_single);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
@@ -1824,7 +1824,7 @@ static int vertex_group_mirror_exec(bContext *C, wmOperator *op)
ED_vgroup_mirror(ob, RNA_boolean_get(op->ptr,"mirror_weights"), RNA_boolean_get(op->ptr,"flip_group_names"));
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
@@ -1865,7 +1865,7 @@ static int vertex_group_copy_to_linked_exec(bContext *C, wmOperator *UNUSED(op))
BLI_duplicatelist(&base->object->defbase, &ob->defbase);
base->object->actdef= ob->actdef;
- DAG_id_flush_update(&base->object->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&base->object->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, base->object);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, base->object->data);
@@ -1932,7 +1932,7 @@ static int set_active_group_exec(bContext *C, wmOperator *op)
ob->actdef= nr+1;
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob);
return OPERATOR_FINISHED;
@@ -2088,7 +2088,7 @@ static int vertex_group_sort_exec(bContext *C, wmOperator *op)
ret = vgroup_do_remap(ob, name_array, op);
if (ret != OPERATOR_CANCELLED) {
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob);
}
@@ -2142,7 +2142,7 @@ static int vgroup_move_exec(bContext *C, wmOperator *op)
if (name_array) MEM_freeN(name_array);
if (ret != OPERATOR_CANCELLED) {
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob);
}