forked from bartvdbraak/blender
=== Animation ===
Patch #4044 patch to change the step when changing frame with up or down arrow keys. This adds a per Scene setting to specify the number of frames skipped by the up and down arrow. This setting can be changed in the Timeline header and in the Anim/Playback section of the Scene settings. Upon loading a file without that setting or creating a new scene, it is set to 10 Also fixed the Start and End frame buttons in the Scene buttons to do a proper refresh.
This commit is contained in:
parent
342bb99a19
commit
1c89ae39cc
@ -223,6 +223,8 @@ Scene *add_scene(char *name)
|
||||
sce->toolsettings->uvcalc_cubesize = 1.0f;
|
||||
sce->toolsettings->uvcalc_mapdir = 1;
|
||||
sce->toolsettings->uvcalc_mapalign = 1;
|
||||
|
||||
sce->jumpframe = 10;
|
||||
|
||||
strcpy(sce->r.backbuf, "//backbuf");
|
||||
strcpy(sce->r.pic, U.renderdir);
|
||||
|
@ -5311,6 +5311,8 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
|
||||
}
|
||||
for(sce= main->scene.first; sce; sce= sce->id.next) {
|
||||
bScreen *sc;
|
||||
|
||||
if(sce->jumpframe==0) sce->jumpframe= 10;
|
||||
|
||||
if(sce->r.xparts<2) sce->r.xparts= 4;
|
||||
if(sce->r.yparts<2) sce->r.yparts= 4;
|
||||
|
@ -381,6 +381,9 @@ typedef struct Scene {
|
||||
|
||||
ListBase markers;
|
||||
|
||||
short jumpframe;
|
||||
short pad1, pad2, pad3;
|
||||
|
||||
/* none of the dependancy graph vars is mean to be saved */
|
||||
struct DagForest *theDag;
|
||||
short dagisvalid, dagflags;
|
||||
|
@ -1944,9 +1944,11 @@ void anim_panels()
|
||||
uiDefButBitS(block, TOG, AUDIO_SYNC, B_SOUND_CHANGED, "Sync",160,130,150,20, &G.scene->audio.flag, 0, 0, 0, 0, "Use sample clock for syncing animation to audio");
|
||||
|
||||
uiBlockBeginAlign(block);
|
||||
uiDefButI(block, NUM,REDRAWSEQ,"Sta:", 10,100,150,20,&G.scene->r.sfra,1.0,MAXFRAMEF, 0, 0, "Specify the start frame of the animation");
|
||||
uiDefButI(block, NUM,REDRAWSEQ,"End:", 160,100,150,20,&G.scene->r.efra,1.0,MAXFRAMEF, 0, 0, "Specify the end frame of the animation");
|
||||
uiDefButI(block, NUM,REDRAWALL,"Sta:", 10,100,150,20,&G.scene->r.sfra,1.0,MAXFRAMEF, 0, 0, "Specify the start frame of the animation");
|
||||
uiDefButI(block, NUM,REDRAWALL,"End:", 160,100,150,20,&G.scene->r.efra,1.0,MAXFRAMEF, 0, 0, "Specify the end frame of the animation");
|
||||
|
||||
uiBlockBeginAlign(block);
|
||||
uiDefButS(block, NUMSLI, REDRAWTIME, "Steps:",10, 70, 300, 20,&(G.scene->jumpframe), 1, 100, 1, 100, "Set spacing between frames changes with up and down arrow keys");
|
||||
|
||||
|
||||
}
|
||||
|
@ -468,8 +468,12 @@ void time_buttons(ScrArea *sa)
|
||||
uiDefIconButBitI(block, TOG, TIME_WITH_SEQ_AUDIO, B_DIFF, ICON_SPEAKER,
|
||||
xco, 0, XIC, YIC, &(stime->redraws), 0, 0, 0, 0, "Play back and sync with audio from Sequence Editor");
|
||||
|
||||
//jumpframe
|
||||
xco+= XIC+16;
|
||||
uiDefButS(block, NUM, REDRAWBUTSSCENE, "Steps:",xco, 0, 80, YIC,&(G.scene->jumpframe), 1, 100, 1, 100, "Set spacing between frames changes with up and down arrow keys");
|
||||
|
||||
/* always as last */
|
||||
sa->headbutlen= xco+2*XIC;
|
||||
sa->headbutlen= xco+XIC+80; // +80 because the last button is not an icon
|
||||
|
||||
uiDrawBlock(block);
|
||||
}
|
||||
|
@ -544,11 +544,11 @@ int blenderqread(unsigned short event, short val)
|
||||
if (G.qual==LR_ALTKEY)
|
||||
mainwindow_toggle_fullscreen(0);
|
||||
else if(G.qual==0)
|
||||
CFRA-= 10;
|
||||
CFRA-= G.scene->jumpframe;
|
||||
}
|
||||
#else
|
||||
if((event==DOWNARROWKEY)&&(G.qual==0))
|
||||
CFRA-= 10;
|
||||
CFRA-= G.scene->jumpframe;
|
||||
#endif
|
||||
else if((event==LEFTARROWKEY)&&(G.qual==0))
|
||||
CFRA--;
|
||||
@ -572,11 +572,11 @@ int blenderqread(unsigned short event, short val)
|
||||
if(G.qual==LR_ALTKEY)
|
||||
mainwindow_toggle_fullscreen(1);
|
||||
else if(G.qual==0)
|
||||
CFRA+= 10;
|
||||
CFRA+= G.scene->jumpframe;
|
||||
}
|
||||
#else
|
||||
if((event==UPARROWKEY)&&(G.qual==0))
|
||||
CFRA+= 10;
|
||||
CFRA+= G.scene->jumpframe;
|
||||
#endif
|
||||
else if((event==RIGHTARROWKEY)&&(G.qual==0))
|
||||
CFRA++;
|
||||
|
Loading…
Reference in New Issue
Block a user