diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-12-05 21:59:23 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-12-05 21:59:23 +0300 |
commit | b110c7c8f2c5fafa6412e01d21d751a884bfe8b2 (patch) | |
tree | c414d8b62a65c8d633625498dd36740548605c4c /source/blender/editors/object/object_constraint.c | |
parent | 07692fc59b1837da7510e46c37d0deed85924a52 (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/object_constraint.c')
-rw-r--r-- | source/blender/editors/object/object_constraint.c | 14 |
1 files changed, 7 insertions, 7 deletions
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); |