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:
authorJoshua Leung <aligorith@gmail.com>2009-02-08 14:06:26 +0300
committerJoshua Leung <aligorith@gmail.com>2009-02-08 14:06:26 +0300
commitdd23d47fca5842ae47b0976aa0746f5718799737 (patch)
tree8e46e7cbebc1692effe27f2acc774dad341edf08 /source/blender/editors/animation/anim_deps.c
parentd7f5eab6cb5b96d165b4bef41fe18e68e27165b2 (diff)
Action Editor - Tweaking code for refreshing.
Although there is currently code in place to listen to notifiers + tag updates for regions, these don't actually result in any changes yet. Everything still relies on 'manual' redraw tags for the entire area to have refreshes.
Diffstat (limited to 'source/blender/editors/animation/anim_deps.c')
-rw-r--r--source/blender/editors/animation/anim_deps.c26
1 files changed, 21 insertions, 5 deletions
diff --git a/source/blender/editors/animation/anim_deps.c b/source/blender/editors/animation/anim_deps.c
index ab3e40ef9ca..1ff2169bf61 100644
--- a/source/blender/editors/animation/anim_deps.c
+++ b/source/blender/editors/animation/anim_deps.c
@@ -95,10 +95,10 @@ void ANIM_animdata_send_notifiers (bContext *C, bAnimContext *ac, short data_cha
case ANIM_CHANGED_KEYFRAMES_VALUES:
/* keyframe values changed, so transform may have changed */
// XXX what about other cases? maybe we need general ND_KEYFRAMES or ND_ANIMATION?
- WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
+ WM_event_add_notifier(C, NC_OBJECT|ND_KEYS|ND_TRANSFORM, NULL);
break;
- case ANIM_CHANGED_KEYFRAMES_SELECT: // XXX what to do here?
- WM_event_add_notifier(C, NC_SCENE, NULL);
+ case ANIM_CHANGED_KEYFRAMES_SELECT:
+ WM_event_add_notifier(C, NC_OBJECT|ND_KEYS, NULL);
break;
case ANIM_CHANGED_CHANNELS:
// XXX err... check available datatypes in dopesheet first?
@@ -117,8 +117,24 @@ void ANIM_animdata_send_notifiers (bContext *C, bAnimContext *ac, short data_cha
{
Object *obact= CTX_data_active_object(C);
- // only update active object for now... more detail to come!
- WM_event_add_notifier(C, NC_OBJECT, obact);
+ switch (data_changed) {
+ case ANIM_CHANGED_KEYFRAMES_VALUES:
+ /* keyframe values changed, so transform may have changed */
+ // XXX what about other cases? maybe we need general ND_KEYFRAMES or ND_ANIMATION?
+ WM_event_add_notifier(C, NC_OBJECT|ND_KEYS|ND_TRANSFORM, obact);
+ break;
+ case ANIM_CHANGED_KEYFRAMES_SELECT:
+ WM_event_add_notifier(C, NC_OBJECT|ND_KEYS, obact);
+ break;
+ case ANIM_CHANGED_CHANNELS:
+ // XXX err... check available datatypes in dopesheet first?
+ // FIXME: this currently doesn't work (to update own view)
+ WM_event_add_notifier(C, NC_OBJECT|ND_BONE_ACTIVE|ND_BONE_SELECT, obact);
+ break;
+ }
+
+ // XXX for now, at least update own editor!
+ ED_area_tag_redraw(CTX_wm_area(C));
}
break;