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:
authorMartin Poirier <theeth@yahoo.com>2006-04-16 20:50:26 +0400
committerMartin Poirier <theeth@yahoo.com>2006-04-16 20:50:26 +0400
commit1c89ae39cce31834d22124237b8071c46365418a (patch)
tree73edfa8b40c1ae2dce5c32f92fbd38f464214de3
parent342bb99a19579531dcc4b5dbc1d4b3862ba91f04 (diff)
=== 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.
-rw-r--r--source/blender/blenkernel/intern/scene.c2
-rw-r--r--source/blender/blenloader/intern/readfile.c2
-rw-r--r--source/blender/makesdna/DNA_scene_types.h3
-rw-r--r--source/blender/src/buttons_scene.c6
-rw-r--r--source/blender/src/header_time.c6
-rw-r--r--source/blender/src/toets.c8
6 files changed, 20 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index dc6fe4bad5e..5a6854e548d 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -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);
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 34921569b37..3e265451c1e 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -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;
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index 1a9d10c37b4..f568e2177fd 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -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;
diff --git a/source/blender/src/buttons_scene.c b/source/blender/src/buttons_scene.c
index 8a6dc80068b..9c6b21fafa6 100644
--- a/source/blender/src/buttons_scene.c
+++ b/source/blender/src/buttons_scene.c
@@ -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");
}
diff --git a/source/blender/src/header_time.c b/source/blender/src/header_time.c
index 8769f3e8be9..553d3b3e8f6 100644
--- a/source/blender/src/header_time.c
+++ b/source/blender/src/header_time.c
@@ -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);
}
diff --git a/source/blender/src/toets.c b/source/blender/src/toets.c
index 972b5a0af06..f470e0a43e8 100644
--- a/source/blender/src/toets.c
+++ b/source/blender/src/toets.c
@@ -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++;