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/mesh/editmesh_tools.c
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/mesh/editmesh_tools.c')
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c66
1 files changed, 33 insertions, 33 deletions
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 6b101c0c92f..1ee93adccfc 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -483,7 +483,7 @@ static int removedoublesflag_exec(bContext *C, wmOperator *op)
if(count) {
recalc_editnormals(em);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
}
@@ -643,7 +643,7 @@ static void extrude_mesh(Object *obedit, EditMesh *em, wmOperator *op, short typ
* This shouldn't be necessary, derived queries should be
* automatically building this data if invalid. Or something.
*/
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
/* individual faces? */
// BIF_TransformSetUndo("Extrude");
@@ -674,7 +674,7 @@ static int mesh_extrude_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even
BKE_mesh_end_editmesh(obedit->data, em);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
@@ -688,7 +688,7 @@ static int mesh_extrude_exec(bContext *C, wmOperator *op)
extrude_mesh(obedit, em, op, RNA_int_get(op->ptr, "type"));
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
@@ -810,7 +810,7 @@ static int split_mesh(bContext *C, wmOperator *UNUSED(op))
WM_cursor_wait(0);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
@@ -870,7 +870,7 @@ static int extrude_repeat_mesh(bContext *C, wmOperator *op)
EM_fgon_flags(em);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
@@ -974,7 +974,7 @@ static int spin_mesh(bContext *C, wmOperator *op, float *dvec, int steps, float
EM_fgon_flags(em);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
}
BKE_mesh_end_editmesh(obedit->data, em);
@@ -992,7 +992,7 @@ static int spin_mesh_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
@@ -1093,7 +1093,7 @@ static int screw_mesh_exec(bContext *C, wmOperator *op)
}
if(spin_mesh(C, op, dvec, turns*steps, 360.0f*turns, 0)) {
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
@@ -1348,7 +1348,7 @@ static int delete_mesh_exec(bContext *C, wmOperator *op)
delete_mesh(em, op, type);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
@@ -2756,7 +2756,7 @@ void esubdivideflag(Object *obedit, EditMesh *em, int flag, float smooth, float
}
}
-// DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+// DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
// Now for each face in the mesh we need to figure out How many edges were cut
// and which filling method to use for that face
for(ef = em->faces.first;ef;ef = ef->next) {
@@ -3799,7 +3799,7 @@ static int edge_rotate_selected(bContext *C, wmOperator *op)
BKE_mesh_end_editmesh(obedit->data, em);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
@@ -4650,7 +4650,7 @@ useless:
} else {
draw = 0;
}
-// DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+// DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
}
@@ -4670,7 +4670,7 @@ useless:
if(!immediate)
EM_automerge(0);
-// DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+// DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
// scrarea_queue_winredraw(curarea);
//BLI_ghash_free(edgesgh, freeGHash, NULL);
@@ -4721,7 +4721,7 @@ int EdgeLoopDelete(EditMesh *UNUSED(em), wmOperator *UNUSED(op))
EM_select_more(em);
removedoublesflag(em, 1,0, 0.001);
EM_select_flush(em);
- // DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ // DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
return 1;
#endif
return 0;
@@ -5030,7 +5030,7 @@ static int mesh_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
}
}
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
@@ -5103,7 +5103,7 @@ static void shape_propagate(Object *obedit, EditMesh *em, wmOperator *op)
}
#endif
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
return;
}
@@ -5116,7 +5116,7 @@ static int shape_propagate_to_all_exec(bContext *C, wmOperator *op)
shape_propagate(obedit, em, op);
- DAG_id_flush_update(&me->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&me->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, me);
return OPERATOR_FINISHED;
@@ -5178,7 +5178,7 @@ static int blend_from_shape_exec(bContext *C, wmOperator *op)
if(!blended)
return OPERATOR_CANCELLED;
- DAG_id_flush_update(&me->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&me->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, me);
return OPERATOR_FINISHED;
@@ -5881,7 +5881,7 @@ static int merge_exec(bContext *C, wmOperator *op)
BKE_mesh_end_editmesh(obedit->data, em);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
@@ -6461,7 +6461,7 @@ static int mesh_rotate_uvs(bContext *C, wmOperator *op)
if(!change)
return OPERATOR_CANCELLED;
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
@@ -6550,7 +6550,7 @@ static int mesh_mirror_uvs(bContext *C, wmOperator *op)
if(!change)
return OPERATOR_CANCELLED;
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
@@ -6606,7 +6606,7 @@ static int mesh_rotate_colors(bContext *C, wmOperator *op)
if(!change)
return OPERATOR_CANCELLED;
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
@@ -6662,7 +6662,7 @@ static int mesh_mirror_colors(bContext *C, wmOperator *op)
if(!change)
return OPERATOR_CANCELLED;
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
@@ -6760,7 +6760,7 @@ static int subdivide_exec(bContext *C, wmOperator *op)
esubdivideflag(obedit, em, 1, smooth, fractal, ts->editbutflag|flag, cuts, corner_cut_pattern, 0);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
@@ -7042,7 +7042,7 @@ static int fill_mesh_exec(bContext *C, wmOperator *UNUSED(op))
BKE_mesh_end_editmesh(obedit->data, em);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
@@ -7073,7 +7073,7 @@ static int beautify_fill_exec(bContext *C, wmOperator *UNUSED(op))
BKE_mesh_end_editmesh(obedit->data, em);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
@@ -7237,7 +7237,7 @@ static int sort_faces_exec(bContext *C, wmOperator *op)
}
MEM_freeN(index);
- DAG_id_flush_update(ob->data, OB_RECALC_DATA);
+ DAG_id_tag_update(ob->data, OB_RECALC_DATA);
/* Return to editmode. */
ED_object_enter_editmode(C, 0);
@@ -7281,7 +7281,7 @@ static int quads_convert_to_tris_exec(bContext *C, wmOperator *UNUSED(op))
convert_to_triface(em,0);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
@@ -7310,7 +7310,7 @@ static int tris_convert_to_quads_exec(bContext *C, wmOperator *UNUSED(op))
join_triangles(em);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
@@ -7339,7 +7339,7 @@ static int edge_flip_exec(bContext *C, wmOperator *UNUSED(op))
edge_flip(em);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
BKE_mesh_end_editmesh(obedit->data, em);
@@ -7386,7 +7386,7 @@ static int mesh_faces_shade_smooth_exec(bContext *C, wmOperator *UNUSED(op))
BKE_mesh_end_editmesh(obedit->data, em);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;
@@ -7414,7 +7414,7 @@ static int mesh_faces_shade_flat_exec(bContext *C, wmOperator *UNUSED(op))
mesh_set_smooth_faces(em, 0);
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
return OPERATOR_FINISHED;