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_shapekey.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/blender/editors/object/object_shapekey.c') 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; -- cgit v1.2.3