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/uvedit/uvedit_ops.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/uvedit/uvedit_ops.c')
-rw-r--r-- | source/blender/editors/uvedit/uvedit_ops.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index 5d2798aad05..4ae7ae85eff 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -135,7 +135,7 @@ void ED_uvedit_assign_image(Scene *scene, Object *obedit, Image *ima, Image *pre /* and update depdency graph */ if(update) - 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); } @@ -168,7 +168,7 @@ static int uvedit_set_tile(Object *obedit, Image *ima, int curtile) tf->tile= curtile; /* set tile index */ } - 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); return 1; @@ -1018,7 +1018,7 @@ static void weld_align_uv(bContext *C, int tool) } } - 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); @@ -1241,7 +1241,7 @@ static int stitch_exec(bContext *C, wmOperator *op) MEM_freeN(uv_average); } - 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); @@ -1702,7 +1702,7 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop) } } - 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_SELECT, obedit->data); BKE_mesh_end_editmesh(obedit->data, em); @@ -1854,7 +1854,7 @@ static int select_linked_internal(bContext *C, wmOperator *op, wmEvent *event, i select_linked(scene, ima, em, limit, hit_p, extend); - 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_SELECT, obedit->data); BKE_mesh_end_editmesh(obedit->data, em); @@ -1943,7 +1943,7 @@ static int unlink_selection_exec(bContext *C, wmOperator *op) } } - 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_SELECT, obedit->data); BKE_mesh_end_editmesh(obedit->data, em); @@ -2624,7 +2624,7 @@ static int snap_selection_exec(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; |