new notifier for FRAME_RANGE, use to recalculate the timeline scrollbar range.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user