fix [#26906] Panorama Button (Camera Data Properties)
[blender-staging.git] / source / blender / render / intern / source / pipeline.c
index 458fe8ff2c1be26779a8bf31b36264d24c27f97d..866d17200e1b47123a26f3827aa534a93fca86ea 100644 (file)
@@ -2705,14 +2705,6 @@ int RE_is_rendering_allowed(Scene *scene, void *erh, void (*error)(void *handle,
 {
        SceneRenderLayer *srl;
        
-       /* forbidden combinations */
-       if(scene->r.mode & R_PANORAMA) {
-               if(scene->r.mode & R_ORTHO) {
-                       error(erh, "No Ortho render possible for Panorama");
-                       return 0;
-               }
-       }
-       
        if(scene->r.mode & R_BORDER) {
                if(scene->r.border.xmax <= scene->r.border.xmin ||
                   scene->r.border.ymax <= scene->r.border.ymin) {
@@ -2775,6 +2767,17 @@ int RE_is_rendering_allowed(Scene *scene, void *erh, void (*error)(void *handle,
                return 0;
        }
        
+       /* get panorama & ortho, only after camera is set */
+       object_camera_mode(&scene->r, scene->camera);
+
+       /* forbidden combinations */
+       if(scene->r.mode & R_PANORAMA) {
+               if(scene->r.mode & R_ORTHO) {
+                       error(erh, "No Ortho render possible for Panorama");
+                       return 0;
+               }
+       }
+
        /* layer flag tests */
        if(scene->r.scemode & R_SINGLE_LAYER) {
                srl= BLI_findlink(&scene->r.layers, scene->r.actlay);