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/armature
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/armature')
-rw-r--r--source/blender/editors/armature/editarmature.c20
-rw-r--r--source/blender/editors/armature/poseUtils.c2
-rw-r--r--source/blender/editors/armature/poselib.c6
-rw-r--r--source/blender/editors/armature/poseobject.c14
4 files changed, 21 insertions, 21 deletions
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c
index 78b78952df4..2e251a67a34 100644
--- a/source/blender/editors/armature/editarmature.c
+++ b/source/blender/editors/armature/editarmature.c
@@ -409,7 +409,7 @@ void ED_armature_from_edit(Object *obedit)
armature_rebuild_pose(obt, arm);
}
- DAG_id_flush_update(&obedit->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&obedit->id, OB_RECALC_DATA);
}
void ED_armature_apply_transform(Object *ob, float mat[4][4])
@@ -677,7 +677,7 @@ static int pose_visual_transform_apply_exec (bContext *C, wmOperator *UNUSED(op)
CTX_DATA_END;
// 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);
/* note, notifier might evolve */
WM_event_add_notifier(C, NC_OBJECT|ND_POSE, ob);
@@ -1172,8 +1172,8 @@ static int separate_armature_exec (bContext *C, wmOperator *UNUSED(op))
/* 4) fix links before depsgraph flushes */ // err... or after?
separated_armature_fix_links(oldob, newob);
- DAG_id_flush_update(&oldob->id, OB_RECALC_DATA); /* this is the original one */
- DAG_id_flush_update(&newob->id, OB_RECALC_DATA); /* this is the separated one */
+ DAG_id_tag_update(&oldob->id, OB_RECALC_DATA); /* this is the original one */
+ DAG_id_tag_update(&newob->id, OB_RECALC_DATA); /* this is the separated one */
/* 5) restore original conditions */
@@ -4414,7 +4414,7 @@ int ED_do_pose_selectbuffer(Scene *scene, Base *base, unsigned int *buffer, shor
if (OBACT && OBACT->mode & OB_MODE_WEIGHT_PAINT) {
if (nearBone == arm->act_bone) {
ED_vgroup_select_by_name(OBACT, nearBone->name);
- DAG_id_flush_update(&OBACT->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&OBACT->id, OB_RECALC_DATA);
}
}
@@ -4885,7 +4885,7 @@ static int pose_clear_scale_exec(bContext *C, wmOperator *UNUSED(op))
ED_pose_recalculate_paths(scene, ob);
}
- 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_TRANSFORM, ob);
@@ -4954,7 +4954,7 @@ static int pose_clear_loc_exec(bContext *C, wmOperator *UNUSED(op))
ED_pose_recalculate_paths(scene, ob);
}
- 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_TRANSFORM, ob);
@@ -5107,7 +5107,7 @@ static int pose_clear_rot_exec(bContext *C, wmOperator *UNUSED(op))
ED_pose_recalculate_paths(scene, ob);
}
- 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_TRANSFORM, ob);
@@ -5554,7 +5554,7 @@ static int armature_flip_names_exec (bContext *C, wmOperator *UNUSED(op))
CTX_DATA_END;
/* since we renamed stuff... */
- 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_POSE, ob);
@@ -5600,7 +5600,7 @@ static int armature_autoside_names_exec (bContext *C, wmOperator *op)
CTX_DATA_END;
/* since we renamed stuff... */
- 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_POSE, ob);
diff --git a/source/blender/editors/armature/poseUtils.c b/source/blender/editors/armature/poseUtils.c
index b8b9c354d9a..6756691c506 100644
--- a/source/blender/editors/armature/poseUtils.c
+++ b/source/blender/editors/armature/poseUtils.c
@@ -161,7 +161,7 @@ void poseAnim_mapping_refresh (bContext *C, Scene *scene, Object *ob)
*/
// FIXME: shouldn't this use the builtin stuff?
if ((arm->flag & ARM_DELAYDEFORM)==0)
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA); /* sets recalc flags */
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA); /* sets recalc flags */
else
where_is_pose(scene, ob);
diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c
index 2ec940d25bc..5636b67df9a 100644
--- a/source/blender/editors/armature/poselib.c
+++ b/source/blender/editors/armature/poselib.c
@@ -826,7 +826,7 @@ static void poselib_preview_apply (bContext *C, wmOperator *op)
*/
// FIXME: shouldn't this use the builtin stuff?
if ((pld->arm->flag & ARM_DELAYDEFORM)==0)
- DAG_id_flush_update(&pld->ob->id, OB_RECALC_DATA); /* sets recalc flags */
+ DAG_id_tag_update(&pld->ob->id, OB_RECALC_DATA); /* sets recalc flags */
else
where_is_pose(pld->scene, pld->ob);
}
@@ -1330,7 +1330,7 @@ static void poselib_preview_cleanup (bContext *C, wmOperator *op)
* - note: code copied from transform_generics.c -> recalcData()
*/
if ((arm->flag & ARM_DELAYDEFORM)==0)
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA); /* sets recalc flags */
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA); /* sets recalc flags */
else
where_is_pose(scene, ob);
@@ -1344,7 +1344,7 @@ static void poselib_preview_cleanup (bContext *C, wmOperator *op)
action_set_activemarker(act, marker, 0);
/* Update event for pose and deformation children */
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
/* updates */
if (IS_AUTOKEY_MODE(scene, NORMAL)) {
diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c
index db2e8eb276a..fbc0e4929ee 100644
--- a/source/blender/editors/armature/poseobject.c
+++ b/source/blender/editors/armature/poseobject.c
@@ -851,7 +851,7 @@ void pose_copy_menu(Scene *scene)
ob->pose->flag |= POSE_RECALC;
}
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA); // and all its relations
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA); // and all its relations
BIF_undo_push("Copy Pose Attributes");
@@ -1069,7 +1069,7 @@ static int pose_paste_exec (bContext *C, wmOperator *op)
}
/* Update event for pose and deformation children */
- 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_POSE, ob);
@@ -1471,7 +1471,7 @@ static int pose_flip_names_exec (bContext *C, wmOperator *UNUSED(op))
CTX_DATA_END;
/* since we renamed stuff... */
- 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_POSE, ob);
@@ -1518,7 +1518,7 @@ static int pose_autoside_names_exec (bContext *C, wmOperator *op)
CTX_DATA_END;
/* since we renamed stuff... */
- 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_POSE, ob);
@@ -1581,7 +1581,7 @@ void pose_activate_flipped_bone(Scene *scene)
/* in weightpaint we select the associated vertex group too */
if(ob->mode & OB_MODE_WEIGHT_PAINT) {
ED_vgroup_select_by_name(OBACT, name);
- DAG_id_flush_update(&OBACT->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&OBACT->id, OB_RECALC_DATA);
}
// XXX notifiers need to be sent to other editors to update
@@ -1865,7 +1865,7 @@ static int pose_flip_quats_exec (bContext *C, wmOperator *UNUSED(op))
CTX_DATA_END;
/* notifiers and 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_TRANSFORM, ob);
return OPERATOR_FINISHED;
@@ -1954,7 +1954,7 @@ static void pose_clear_user_transforms(Object *ob)
rest_pose(ob->pose);
}
- DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
BIF_undo_push("Clear User Transform");
}