diff options
author | Matt Ebb <matt@mke3.net> | 2009-11-10 07:56:55 +0300 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2009-11-10 07:56:55 +0300 |
commit | 297045fd965d506b3475ae8897e217a3351929e4 (patch) | |
tree | 3512fd18bd8008bcc22c4099dc2585c7e09851df /source/blender | |
parent | b24b858394bdfc9c1d29eba373975d4bcaffa5ff (diff) |
Fix for [#19852] Animation rendering not working in new scene
As part of this commit, I moved the scene frame_step to RenderData, where the other frame-related data is.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/scene.c | 1 | ||||
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 17 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 6 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_scene_types.h | 7 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 2 |
5 files changed, 16 insertions, 17 deletions
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 4f72ca96f5f..280311eee06 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -323,6 +323,7 @@ Scene *add_scene(char *name) sce->r.cfra= 1; sce->r.sfra= 1; sce->r.efra= 250; + sce->r.frame_step= 1; sce->r.xsch= 1920; sce->r.ysch= 1080; sce->r.xasp= 1; diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index d86d4c787bc..f6e216b36e8 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -9157,15 +9157,6 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } } - if (main->versionfile < 247 || (main->versionfile == 247 && main->subversionfile < 4)){ - Scene *sce= main->scene.first; - while(sce) { - if(sce->frame_step==0) - sce->frame_step= 1; - sce= sce->id.next; - } - } - if (main->versionfile < 247 || (main->versionfile == 247 && main->subversionfile < 5)) { Lamp *la= main->lamp.first; for(; la; la= la->id.next) { @@ -10036,6 +10027,14 @@ static void do_versions(FileData *fd, Library *lib, Main *main) /* put 2.50 compatibility code here until next subversion bump */ { + { + Scene *sce= main->scene.first; + while(sce) { + if(sce->r.frame_step==0) + sce->r.frame_step= 1; + sce= sce->id.next; + } + } } /* WATCH IT!!!: pointers from libdata have not been converted yet here! */ diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index a1537b2ddf5..7e2c74bb8a9 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -2672,7 +2672,7 @@ static int screen_render_exec(bContext *C, wmOperator *op) RE_test_break_cb(re, NULL, (int (*)(void *)) blender_test_break); if(RNA_boolean_get(op->ptr, "animation")) - RE_BlenderAnim(re, scene, scene->r.sfra, scene->r.efra, scene->frame_step); + RE_BlenderAnim(re, scene, scene->r.sfra, scene->r.efra, scene->r.frame_step); else RE_BlenderFrame(re, scene, scene->r.cfra); @@ -2892,7 +2892,7 @@ static void render_startjob(void *rjv, short *stop, short *do_update) rj->do_update= do_update; if(rj->anim) - RE_BlenderAnim(rj->re, rj->scene, rj->scene->r.sfra, rj->scene->r.efra, rj->scene->frame_step); + RE_BlenderAnim(rj->re, rj->scene, rj->scene->r.sfra, rj->scene->r.efra, rj->scene->r.frame_step); else RE_BlenderFrame(rj->re, rj->scene, rj->scene->r.cfra); } @@ -3245,7 +3245,7 @@ static int screen_opengl_render_modal(bContext *C, wmOperator *op, wmEvent *even printf("\n"); /* go to next frame */ - oglrender->nfra += scene->frame_step; + oglrender->nfra += scene->r.frame_step; scene->r.cfra++; WM_event_add_notifier(C, NC_SCENE|ND_RENDER_RESULT, oglrender->scene); diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index bafe8cc3162..b041227110b 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -191,7 +191,8 @@ typedef struct RenderData { float edgeR, edgeG, edgeB; short fullscreen, xplay, yplay, freqplay; /* standalone player */ // XXX deprecated since 2.5 - short depth, attrib, rt1, rt2; /* standalone player */ // XXX deprecated since 2.5 + short depth, attrib, rt2; /* standalone player */ // XXX deprecated since 2.5 + short frame_step; /* frames to jump during render/playback */ short stereomode; /* standalone player stereo settings */ // XXX deprecated since 2.5 @@ -738,10 +739,8 @@ typedef struct Scene { short recalc; /* recalc = counterpart of ob->recalc */ short jumpframe; + int pad5; - /* frame step. */ - int frame_step; - /* User-Defined KeyingSets */ int active_keyingset; /* index of the active KeyingSet. first KeyingSet has index 1, 'none' active is 0, 'add new' is -1 */ ListBase keyingsets; /* KeyingSets for the given frame */ diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 5344d549565..1ea342de163 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -2287,7 +2287,7 @@ void RNA_def_scene(BlenderRNA *brna) prop= RNA_def_property(srna, "frame_step", PROP_INT, PROP_TIME); RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE); - RNA_def_property_int_sdna(prop, NULL, "frame_step"); + RNA_def_property_int_sdna(prop, NULL, "r.frame_step"); RNA_def_property_range(prop, 0, MAXFRAME); RNA_def_property_ui_range(prop, 0, 100, 1, 0); RNA_def_property_ui_text(prop, "Frame Step", "Number of frames to skip forward while rendering/playing back each frame"); |