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/space_view3d
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/space_view3d')
-rw-r--r--source/blender/editors/space_view3d/view3d_buttons.c12
-rw-r--r--source/blender/editors/space_view3d/view3d_fly.c6
-rw-r--r--source/blender/editors/space_view3d/view3d_snap.c6
3 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c
index 36fef45249d..bb0ea9f0b63 100644
--- a/source/blender/editors/space_view3d/view3d_buttons.c
+++ b/source/blender/editors/space_view3d/view3d_buttons.c
@@ -666,7 +666,7 @@ static void do_view3d_vgroup_buttons(bContext *C, void *UNUSED(arg), int event)
// ED_vgroup_mirror(ob, 1, 1, 0);
/* default for now */
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data);
}
@@ -1006,14 +1006,14 @@ static void do_view3d_region_buttons(bContext *C, void *UNUSED(index), int event
return; /* no notifier! */
case B_OBJECTPANEL:
- DAG_id_flush_update(&ob->id, OB_RECALC_OB);
+ DAG_id_tag_update(&ob->id, OB_RECALC_OB);
break;
case B_OBJECTPANELMEDIAN:
if(ob) {
v3d_editvertex_buts(NULL, v3d, ob, 1.0);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
}
break;
@@ -1024,7 +1024,7 @@ static void do_view3d_region_buttons(bContext *C, void *UNUSED(index), int event
ob->parent= NULL;
else {
DAG_scene_sort(bmain, scene);
- DAG_id_flush_update(&ob->id, OB_RECALC_OB);
+ DAG_id_tag_update(&ob->id, OB_RECALC_OB);
}
}
break;
@@ -1058,7 +1058,7 @@ static void do_view3d_region_buttons(bContext *C, void *UNUSED(index), int event
case B_ARMATUREPANEL2:
{
ob->pose->flag |= (POSE_LOCKED|POSE_DO_UNLOCK);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
}
break;
case B_TRANSFORMSPACEADD:
@@ -1114,7 +1114,7 @@ static void do_view3d_region_buttons(bContext *C, void *UNUSED(index), int event
int a;
for(a=0; a<me->totvert; a++)
ED_vgroup_vert_remove (ob, defGroup, a);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
}
}
break;
diff --git a/source/blender/editors/space_view3d/view3d_fly.c b/source/blender/editors/space_view3d/view3d_fly.c
index 1711520df63..6b600f277f0 100644
--- a/source/blender/editors/space_view3d/view3d_fly.c
+++ b/source/blender/editors/space_view3d/view3d_fly.c
@@ -368,7 +368,7 @@ static int flyEnd(bContext *C, FlyInfo *fly)
/* store the original camera loc and rot */
object_tfm_restore(ob_back, fly->obtfm);
- DAG_id_flush_update(&ob_back->id, OB_RECALC_OB);
+ DAG_id_tag_update(&ob_back->id, OB_RECALC_OB);
} else {
/* Non Camera we need to reset the view back to the original location bacause the user canceled*/
copy_qt_qt(rv3d->viewquat, fly->rot_backup);
@@ -377,7 +377,7 @@ static int flyEnd(bContext *C, FlyInfo *fly)
}
}
else if (fly->persp_backup==RV3D_CAMOB) { /* camera */
- DAG_id_flush_update(fly->root_parent ? &fly->root_parent->id : &v3d->camera->id, OB_RECALC_OB);
+ DAG_id_tag_update(fly->root_parent ? &fly->root_parent->id : &v3d->camera->id, OB_RECALC_OB);
}
else { /* not camera */
/* Apply the fly mode view */
@@ -800,7 +800,7 @@ static int flyApply(bContext *C, FlyInfo *fly)
ob_update= v3d->camera->parent;
while(ob_update) {
- DAG_id_flush_update(&ob_update->id, OB_RECALC_OB);
+ DAG_id_tag_update(&ob_update->id, OB_RECALC_OB);
ob_update= ob_update->parent;
}
diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c
index 5bedcfd793f..beb6170e0dc 100644
--- a/source/blender/editors/space_view3d/view3d_snap.c
+++ b/source/blender/editors/space_view3d/view3d_snap.c
@@ -87,7 +87,7 @@ static void special_transvert_update(Object *obedit)
if(obedit) {
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ DAG_id_tag_update(obedit->data, OB_RECALC_DATA);
if(obedit->type==OB_MESH) {
Mesh *me= obedit->data;
@@ -522,7 +522,7 @@ static int snap_sel_to_grid(bContext *C, wmOperator *UNUSED(op))
/* auto-keyframing */
// XXX autokeyframe_pose_cb_func(ob, TFM_TRANSLATION, 0);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
}
else {
ob->recalc |= OB_RECALC_OB;
@@ -646,7 +646,7 @@ static int snap_sel_to_curs(bContext *C, wmOperator *UNUSED(op))
/* auto-keyframing */
// XXX autokeyframe_pose_cb_func(ob, TFM_TRANSLATION, 0);
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
}
else {
ob->recalc |= OB_RECALC_OB;