Fix for bug #9687: crash with FSA when compiling with openexr support.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 28 Apr 2008 12:14:30 +0000 (12:14 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 28 Apr 2008 12:14:30 +0000 (12:14 +0000)
FSA requires exr, so I've disabled the buttons too in that case. I also
noticed CMake doesn't enable openexr by default, but a lot of the render
code relies on it, so I've enabled it by default now.

CMakeLists.txt
source/blender/render/intern/source/pipeline.c
source/blender/src/buttons_scene.c

index bbc799e7f6f6cbe40e82ae834c7a84010ffce66f..1c34233245a084ee3cd40fd362835a10c79f62a4 100644 (file)
@@ -60,7 +60,7 @@ OPTION(WITH_INTERNATIONAL     "Enable I18N   (International fonts and text)"          ON)
 OPTION(WITH_VERSE              "Enable Verse  (http://verse.blender.org)"              OFF)
 OPTION(WITH_ELBEEM             "Enable Elbeem (Fluid Simulation)"                      ON)
 OPTION(WITH_QUICKTIME          "Enable Quicktime Support"                              OFF)
-OPTION(WITH_OPENEXR            "Enable OpenEXR Support (http://www.openexr.com)"       OFF)
+OPTION(WITH_OPENEXR            "Enable OpenEXR Support (http://www.openexr.com)"       ON)
 OPTION(WITH_FFMPEG             "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu/)"   OFF)
 OPTION(WITH_OPENAL             "Enable OpenAL Support (http://www.openal.org)"         ON)
 OPTION(YESIAMSTUPID            "Enable execution on 64-bit platforms"                  OFF)
index 2c6da8b2cb8bae991d2e35f7c8c0345dd63f72ee..09c850b6252fc3cce7e74e92f27c5bcae5fce5c1 100644 (file)
@@ -1081,6 +1081,10 @@ void RE_InitState(Render *re, Render *source, RenderData *rd, int winx, int winy
                re->ok= 0;
        }
        else {
+#ifndef WITH_OPENEXR
+               /* can't do this without openexr support */
+               re->r.scemode &= ~R_EXR_TILE_FILE;
+#endif
                
                if(!(re->r.scemode & R_EXR_TILE_FILE))
                        re->r.scemode &= ~R_FULL_SAMPLE;        /* clear, so we can use this flag for test both */
index 77a46168e1f679b01691f2e79cbc408f5fc5ab4b..5fd23af591e6b09c6d5c52db16d093aa2542eade 100644 (file)
@@ -2043,12 +2043,15 @@ static void render_panel_output(void)
        for(b=2; b>=0; b--)
                for(a=0; a<3; a++)
                        uiDefButBitS(block, TOG, 1<<(3*b+a), 800,"",    (short)(10+18*a),(short)(10+14*b),16,12, &G.winpos, 0, 0, 0, 0, "Render window placement on screen");
+       uiBlockEndAlign(block);
 
+#ifdef WITH_OPENEXR
        uiBlockBeginAlign(block);
        uiDefButBitI(block, TOG, R_EXR_TILE_FILE, B_REDR, "Save Buffers", 72, 31, 120, 19, &G.scene->r.scemode, 0.0, 0.0, 0, 0, "Save tiles for all RenderLayers and used SceneNodes to files in the temp directory (saves memory, allows Full Sampling)");
        if(G.scene->r.scemode & R_EXR_TILE_FILE)
                uiDefButBitI(block, TOG, R_FULL_SAMPLE, B_REDR, "FullSample",    192, 31, 118, 19, &G.scene->r.scemode, 0.0, 0.0, 0, 0, "Saves for every OSA sample the entire RenderLayer results (Higher quality sampling but slower)");
        uiBlockEndAlign(block);
+#endif
        
        uiDefButS(block, MENU, B_REDR, "Render Display %t|Render Window %x1|Image Editor %x0|Full Screen %x2",  
                                        72, 10, 120, 19, &G.displaymode, 0.0, (float)R_DISPLAYWIN, 0, 0, "Sets render output display");