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:
authorTon Roosendaal <ton@blender.org>2008-12-15 21:09:55 +0300
committerTon Roosendaal <ton@blender.org>2008-12-15 21:09:55 +0300
commit628f02d57482e987069c6b9969da309db84dbadd (patch)
treeaf21b3eea1710a65268fc46891512c09091a1652 /source/blender/editors/space_time
parenta16df53619a2ab3b41c0cbcf6f9e01a9bf370c9c (diff)
2.5
Added notifiers for timeline syncing. Works for Timeline window only now. Note that I've removed the malloc-free in a Notifier... notifier system is still under probabtion :)
Diffstat (limited to 'source/blender/editors/space_time')
-rw-r--r--source/blender/editors/space_time/space_time.c9
-rw-r--r--source/blender/editors/space_time/time_header.c8
2 files changed, 13 insertions, 4 deletions
diff --git a/source/blender/editors/space_time/space_time.c b/source/blender/editors/space_time/space_time.c
index 182f0a02f6c..9667e132e09 100644
--- a/source/blender/editors/space_time/space_time.c
+++ b/source/blender/editors/space_time/space_time.c
@@ -162,6 +162,15 @@ static void time_main_area_draw(const bContext *C, ARegion *ar)
static void time_main_area_listener(ARegion *ar, wmNotifier *wmn)
{
/* context changes */
+
+ switch(wmn->type) {
+ case WM_NOTE_TIMELINE_SYNC:
+ if(ar->v2d.flag & V2D_VIEWSYNC_X) {
+ ar->do_draw= 1; /* XXX GAH! */
+ UI_view2d_sync(&ar->v2d, wmn->data, wmn->value);
+ }
+ break;
+ }
}
/* ************************ header time area region *********************** */
diff --git a/source/blender/editors/space_time/time_header.c b/source/blender/editors/space_time/time_header.c
index c87f46760e0..dd222292674 100644
--- a/source/blender/editors/space_time/time_header.c
+++ b/source/blender/editors/space_time/time_header.c
@@ -189,11 +189,11 @@ static void do_time_viewmenu(bContext *C, void *arg, int event)
break;
case 11:
if(v2d) {
- //v2d->flag ^= V2D_VIEWSYNC_X;
- //if(v2d->flag & V2D_VIEWSYNC_X)
- // view2d_do_locks(curarea, 0);
+ v2d->flag ^= V2D_VIEWSYNC_X;
+ if(v2d->flag & V2D_VIEWSYNC_X)
+ WM_event_add_notifier(C, WM_NOTE_TIMELINE_SYNC, 0, v2d); /* XXX can notifier be called after data free? */
}
- break;
+ break;
case 12: /* only show keyframes from selected data */
stime->flag ^= TIME_ONLYACTSEL;
WM_event_add_notifier(C, WM_NOTE_AREA_REDRAW, 0, NULL);