noticed a problem with rendering non-active scenes in the node editor.
authorCampbell Barton <ideasman42@gmail.com>
Tue, 19 Apr 2011 06:37:29 +0000 (06:37 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 19 Apr 2011 06:37:29 +0000 (06:37 +0000)
- the frame from the current scene wasn't used - whereas with rendering it is, set the current frame as is done when node rendering.
- camera switching also failed, added a call to it.

source/blender/editors/render/render_internal.c

index ddab9fae96f70631a0fdd98c769addd9f0d80333..71c88ae9e8f419dfa3684badac6e080a06713318 100644 (file)
@@ -54,6 +54,7 @@
 #include "BKE_report.h"
 #include "BKE_sequencer.h"
 #include "BKE_screen.h"
+#include "BKE_scene.h"
 
 #include "WM_api.h"
 #include "WM_types.h"
@@ -744,6 +745,10 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event)
                rl = (SceneRenderLayer *)BLI_findstring(&scene->r.layers, rl_name, offsetof(SceneRenderLayer, name));
                
                if (scn && rl) {
+                       /* camera switch wont have updated */
+                       scn->r.cfra= scene->r.cfra;
+                       scene_camera_switch_update(scn);
+
                        scene = scn;
                        srl = rl;
                }