diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-06-26 23:17:48 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-06-26 23:17:48 +0400 |
commit | ebde8a7ccc2b897b8f788fe8fb7266b638d4b22f (patch) | |
tree | a054fda1c6681461d87732db0633c627b3958f2f /source/blender | |
parent | 942ebd6558dd78f1c78e641f6daecce54f93ac02 (diff) |
new notifier for FRAME_RANGE, use to recalculate the timeline scrollbar range.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/space_sequencer/space_sequencer.c | 1 | ||||
-rw-r--r-- | source/blender/editors/space_time/space_time.c | 14 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 4 | ||||
-rw-r--r-- | source/blender/windowmanager/WM_types.h | 1 |
4 files changed, 18 insertions, 2 deletions
diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c index 49c2049c66c..8b7670a55bc 100644 --- a/source/blender/editors/space_sequencer/space_sequencer.c +++ b/source/blender/editors/space_sequencer/space_sequencer.c @@ -355,6 +355,7 @@ static void sequencer_main_area_listener(ARegion *ar, wmNotifier *wmn) case NC_SCENE: switch(wmn->data) { case ND_FRAME: + case ND_FRAME_RANGE: case ND_MARKERS: case ND_SEQUENCER: ED_region_tag_redraw(ar); diff --git a/source/blender/editors/space_time/space_time.c b/source/blender/editors/space_time/space_time.c index 7928fc6284a..b2e1bfb9b93 100644 --- a/source/blender/editors/space_time/space_time.c +++ b/source/blender/editors/space_time/space_time.c @@ -410,6 +410,20 @@ static void time_listener(ScrArea *sa, wmNotifier *wmn) case ND_FRAME: ED_area_tag_refresh(sa); break; + case ND_FRAME_RANGE: + { + ARegion *ar; + Scene *scene = wmn->reference; + + for (ar= sa->regionbase.first; ar; ar= ar->next) { + if (ar->regiontype==RGN_TYPE_WINDOW) { + ar->v2d.tot.xmin= (float)(SFRA - 4); + ar->v2d.tot.xmax= (float)(EFRA + 4); + break; + } + } + } + break; } case NC_SPACE: switch (wmn->data) { diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index b752a47a31e..649bebd0d6b 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -2964,7 +2964,7 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_int_funcs(prop, NULL, "rna_Scene_start_frame_set", NULL); RNA_def_property_range(prop, MINFRAME, MAXFRAME); RNA_def_property_ui_text(prop, "Start Frame", "First frame of the playback/rendering range"); - RNA_def_property_update(prop, NC_SCENE|ND_FRAME, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_FRAME_RANGE, NULL); prop= RNA_def_property(srna, "frame_end", PROP_INT, PROP_TIME); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); @@ -2972,7 +2972,7 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_int_funcs(prop, NULL, "rna_Scene_end_frame_set", NULL); RNA_def_property_range(prop, MINFRAME, MAXFRAME); RNA_def_property_ui_text(prop, "End Frame", "Final frame of the playback/rendering range"); - RNA_def_property_update(prop, NC_SCENE|ND_FRAME, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_FRAME_RANGE, NULL); prop= RNA_def_property(srna, "frame_step", PROP_INT, PROP_TIME); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h index 067df17917d..927ea00ae37 100644 --- a/source/blender/windowmanager/WM_types.h +++ b/source/blender/windowmanager/WM_types.h @@ -183,6 +183,7 @@ typedef struct wmNotifier { #define ND_KEYINGSET (12<<16) #define ND_TOOLSETTINGS (13<<16) #define ND_LAYER (14<<16) +#define ND_FRAME_RANGE (15<<16) /* NC_OBJECT Object */ #define ND_TRANSFORM (16<<16) |