From b110c7c8f2c5fafa6412e01d21d751a884bfe8b2 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sun, 5 Dec 2010 18:59:23 +0000 Subject: 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. --- source/blender/editors/object/object_transform.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/blender/editors/object/object_transform.c') 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; } -- cgit v1.2.3