2.5 Bugfixes
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 14 Sep 2009 19:12:29 +0000 (19:12 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 14 Sep 2009 19:12:29 +0000 (19:12 +0000)
#19345: can't get out of grayed out pointer field.
#19342: item_pointerR fields can't be cleared with one item.
#19341: fix hanging tooltips when manipulating regions.
#19339: context panel still allowed tabbing, but it has no header.
#19334: editing SSS settings crashed previewrender.
#19330: object mode could not be switched on from the header menu.

22 files changed:
source/blender/blenkernel/intern/material.c
source/blender/blenloader/intern/readfile.c
source/blender/editors/include/ED_screen.h
source/blender/editors/interface/interface_handlers.c
source/blender/editors/interface/interface_panel.c
source/blender/editors/interface/interface_regions.c
source/blender/editors/object/object_edit.c
source/blender/editors/screen/area.c
source/blender/editors/screen/screen_ops.c
source/blender/editors/space_file/file_ops.c
source/blender/editors/space_graph/graph_buttons.c
source/blender/editors/space_image/image_buttons.c
source/blender/editors/space_logic/logic_buttons.c
source/blender/editors/space_nla/nla_buttons.c
source/blender/editors/space_sequencer/sequencer_buttons.c
source/blender/editors/space_text/text_header.c
source/blender/editors/space_view3d/space_view3d.c
source/blender/editors/space_view3d/view3d_buttons.c
source/blender/editors/space_view3d/view3d_snap.c
source/blender/editors/space_view3d/view3d_toolbar.c
source/blender/render/intern/source/pipeline.c
source/blender/render/intern/source/sss.c

index e6f9ac2f4047cd269d7043f5cd4b83403781d67d..1667bd971025d619df3f4a31e1820a66f5c81712 100644 (file)
@@ -159,9 +159,9 @@ void init_material(Material *ma)
        ma->sss_radius[0]= 1.0f;
        ma->sss_radius[1]= 1.0f;
        ma->sss_radius[2]= 1.0f;
-       ma->sss_col[0]= 0.8f;
-       ma->sss_col[1]= 0.8f;
-       ma->sss_col[2]= 0.8f;
+       ma->sss_col[0]= 1.0f;
+       ma->sss_col[1]= 1.0f;
+       ma->sss_col[2]= 1.0f;
        ma->sss_error= 0.05f;
        ma->sss_scale= 0.1f;
        ma->sss_ior= 1.3f;
index c2d745bfc8ebc6767761c16ef0be84b484d41af9..d02640022145fbb04dbeb944475cb11fdcd0de7b 100644 (file)
@@ -4861,6 +4861,10 @@ static void view3d_split_250(View3D *v3d, ListBase *regions)
                        QUATCOPY(rv3d->viewquat, v3d->viewquat);
                }
        }
+
+       /* this was not initialized correct always */
+       if(v3d->twtype == 0)
+               v3d->twtype= V3D_MANIP_TRANSLATE;
 }
 
 static void direct_link_screen(FileData *fd, bScreen *sc)
@@ -9687,6 +9691,11 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
 
        /* put 2.50 compatibility code here until next subversion bump */
        {
+               Scene *sce;
+
+               for(sce = main->scene.first; sce; sce = sce->id.next)
+                       if(sce->unit.scale_length == 0.0f)
+                               sce->unit.scale_length= 1.0f;
        }
 
        /* WATCH IT!!!: pointers from libdata have not been converted yet here! */
index 697565184f39ee1a5be4a1405bcc009d18e8d03f..63b6a067389128c811a4486f937b929eaf72a2be 100644 (file)
@@ -58,6 +58,7 @@ void  ED_region_panels_init(struct wmWindowManager *wm, struct ARegion *ar);
 void   ED_region_panels(const struct bContext *C, struct ARegion *ar, int vertical, char *context, int contextnr);
 void   ED_region_header_init(struct ARegion *ar);
 void   ED_region_header(const struct bContext *C, struct ARegion *ar);
+void   ED_region_toggle_hidden(struct bContext *C, struct ARegion *ar);
 void   region_scissor_winrct(struct ARegion *ar, struct rcti *winrct);
 
 /* spaces */
index 259ccba6b89a23f6fa1d3063ba2b31811762ceb8..466c1d08ba31daeb5c8cabb50d7b6d17e0068fc3 100644 (file)
@@ -1440,16 +1440,20 @@ static void ui_textedit_next_but(uiBlock *block, uiBut *actbut, uiHandleButtonDa
 
        for(but= actbut->next; but; but= but->next) {
                if(ELEM7(but->type, TEX, NUM, NUMABS, NUMSLI, HSVSLI, IDPOIN, SEARCH_MENU)) {
-                       data->postbut= but;
-                       data->posttype= BUTTON_ACTIVATE_TEXT_EDITING;
-                       return;
+                       if(!(but->flag & UI_BUT_DISABLED)) {
+                               data->postbut= but;
+                               data->posttype= BUTTON_ACTIVATE_TEXT_EDITING;
+                               return;
+                       }
                }
        }
        for(but= block->buttons.first; but!=actbut; but= but->next) {
                if(ELEM7(but->type, TEX, NUM, NUMABS, NUMSLI, HSVSLI, IDPOIN, SEARCH_MENU)) {
-                       data->postbut= but;
-                       data->posttype= BUTTON_ACTIVATE_TEXT_EDITING;
-                       return;
+                       if(!(but->flag & UI_BUT_DISABLED)) {
+                               data->postbut= but;
+                               data->posttype= BUTTON_ACTIVATE_TEXT_EDITING;
+                               return;
+                       }
                }
        }
 }
@@ -1464,16 +1468,20 @@ static void ui_textedit_prev_but(uiBlock *block, uiBut *actbut, uiHandleButtonDa
 
        for(but= actbut->prev; but; but= but->prev) {
                if(ELEM7(but->type, TEX, NUM, NUMABS, NUMSLI, HSVSLI, IDPOIN, SEARCH_MENU)) {
-                       data->postbut= but;
-                       data->posttype= BUTTON_ACTIVATE_TEXT_EDITING;
-                       return;
+                       if(!(but->flag & UI_BUT_DISABLED)) {
+                               data->postbut= but;
+                               data->posttype= BUTTON_ACTIVATE_TEXT_EDITING;
+                               return;
+                       }
                }
        }
        for(but= block->buttons.last; but!=actbut; but= but->prev) {
                if(ELEM7(but->type, TEX, NUM, NUMABS, NUMSLI, HSVSLI, IDPOIN, SEARCH_MENU)) {
-                       data->postbut= but;
-                       data->posttype= BUTTON_ACTIVATE_TEXT_EDITING;
-                       return;
+                       if(!(but->flag & UI_BUT_DISABLED)) {
+                               data->postbut= but;
+                               data->posttype= BUTTON_ACTIVATE_TEXT_EDITING;
+                               return;
+                       }
                }
        }
 }
index 05001109b5300734528ed00ee0536c47e368ff21..776122380bf1ff382632b457597b0a845c9499e9 100644 (file)
@@ -990,6 +990,7 @@ static void test_add_new_tabs(ARegion *ar)
        }
        
        if(pasel==NULL || palap==NULL) return;
+       if(palap->type && palap->type->flag & PNL_NO_HEADER) return;
        
        /* the overlapped panel becomes a tab */
        palap->paneltab= pasel;
index 1d911fef418b798f4d2863605ccef5cbb9454ca2..dfcdea59f6887a17da58f31c666a62c43ba2bc96 100644 (file)
@@ -758,7 +758,7 @@ void ui_searchbox_update(bContext *C, ARegion *ar, uiBut *but, int reset)
                                data->active= a+1;
                        if(cpoin) cpoin[0]= '|';
                }
-               if(data->items.totitem==1)
+               if(data->items.totitem==1 && but->editstr[0])
                        data->active= 1;
        }
 
index e5a8df8cb26939753a8b5aa3a7f570e7aac03c6d..c734a7c606d6dd98d309b3695b08ce4b1d09a709 100644 (file)
@@ -1957,29 +1957,26 @@ static int object_mode_set_compat(bContext *C, wmOperator *op, Object *ob)
        ObjectMode mode = RNA_enum_get(op->ptr, "mode");
 
        if(ob) {
+               if(mode == OB_MODE_OBJECT)
+                       return 1;
+
                switch(ob->type) {
-               case OB_EMPTY:
-               case OB_LAMP:
-               case OB_CAMERA:
-                       if(mode & OB_MODE_OBJECT)
-                               return 1;
-                       return 0;
                case OB_MESH:
-                       if(mode & (     OB_MODE_OBJECT|OB_MODE_EDIT|OB_MODE_SCULPT|OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT|OB_MODE_PARTICLE_EDIT))
+                       if(mode & (OB_MODE_EDIT|OB_MODE_SCULPT|OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT|OB_MODE_PARTICLE_EDIT))
                                return 1;
                        return 0;
                case OB_CURVE:
                case OB_SURF:
                case OB_FONT:
                case OB_MBALL:
-                       if(mode & (OB_MODE_OBJECT|OB_MODE_EDIT))
+                       if(mode & (OB_MODE_EDIT))
                                return 1;
                        return 0;
                case OB_LATTICE:
-                       if(mode & (OB_MODE_OBJECT|OB_MODE_EDIT|OB_MODE_WEIGHT_PAINT))
+                       if(mode & (OB_MODE_EDIT|OB_MODE_WEIGHT_PAINT))
                                return 1;
                case OB_ARMATURE:
-                       if(mode & (OB_MODE_OBJECT|OB_MODE_EDIT|OB_MODE_POSE))
+                       if(mode & (OB_MODE_EDIT|OB_MODE_POSE))
                                return 1;
                }
        }
@@ -2036,7 +2033,7 @@ void OBJECT_OT_mode_set(wmOperatorType *ot)
        /* flags */
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
-       prop= RNA_def_enum(ot->srna, "mode", object_mode_items, 0, "Mode", "");
+       prop= RNA_def_enum(ot->srna, "mode", object_mode_items, OB_MODE_OBJECT, "Mode", "");
        RNA_def_enum_funcs(prop, object_mode_set_itemsf);
 
        RNA_def_boolean(ot->srna, "toggle", 0, "Toggle", "");
index 81f06611c3931c64dbcec58ccf8409e328d27a7f..8940f560677081e84d92f247e6ba4629bcde5ed5 100644 (file)
@@ -916,6 +916,19 @@ void ED_region_init(bContext *C, ARegion *ar)
        
 }
 
+void ED_region_toggle_hidden(bContext *C, ARegion *ar)
+{
+       ScrArea *sa= CTX_wm_area(C);
+
+       ar->flag ^= RGN_FLAG_HIDDEN;
+       ar->v2d.flag &= ~V2D_IS_INITIALISED; /* XXX should become hide/unhide api? */
+
+       if(ar->flag & RGN_FLAG_HIDDEN)
+               WM_event_remove_handlers(C, &ar->handlers);
+
+       ED_area_initialize(CTX_wm_manager(C), CTX_wm_window(C), sa);
+       ED_area_tag_redraw(sa);
+}
 
 /* sa2 to sa1, we swap spaces for fullscreen to keep all allocated data */
 /* area vertices were set */
index dba882200ce53e018d167a987b33a95503ba3e62..f32b11812cfe94278117816ee46458c65a1ec266 100644 (file)
@@ -1320,10 +1320,11 @@ static int region_scale_modal(bContext *C, wmOperator *op, wmEvent *event)
                                CLAMP(rmd->ar->type->minsizex, 0, 1000);
                                if(rmd->ar->type->minsizex < 24) {
                                        rmd->ar->type->minsizex= rmd->origval;
-                                       rmd->ar->flag |= RGN_FLAG_HIDDEN;
+                                       if(!(rmd->ar->flag & RGN_FLAG_HIDDEN))
+                                               ED_region_toggle_hidden(C, rmd->ar);
                                }
-                               else
-                                       rmd->ar->flag &= ~RGN_FLAG_HIDDEN;
+                               else if(rmd->ar->flag & RGN_FLAG_HIDDEN)
+                                       ED_region_toggle_hidden(C, rmd->ar);
                        }
                        else {
                                delta= event->y - rmd->origy;
@@ -1332,10 +1333,11 @@ static int region_scale_modal(bContext *C, wmOperator *op, wmEvent *event)
                                CLAMP(rmd->ar->type->minsizey, 0, 1000);
                                if(rmd->ar->type->minsizey < 24) {
                                        rmd->ar->type->minsizey= rmd->origval;
-                                       rmd->ar->flag |= RGN_FLAG_HIDDEN;
+                                       if(!(rmd->ar->flag & RGN_FLAG_HIDDEN))
+                                               ED_region_toggle_hidden(C, rmd->ar);
                                }
-                               else
-                                       rmd->ar->flag &= ~RGN_FLAG_HIDDEN;
+                               else if(rmd->ar->flag & RGN_FLAG_HIDDEN)
+                                       ED_region_toggle_hidden(C, rmd->ar);
                        }
                        
                        WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
@@ -1346,7 +1348,7 @@ static int region_scale_modal(bContext *C, wmOperator *op, wmEvent *event)
                        if(event->val==0) {
                                
                                if(ABS(event->x - rmd->origx) < 2 && ABS(event->y - rmd->origy) < 2) {
-                                       rmd->ar->flag ^= RGN_FLAG_HIDDEN;
+                                       ED_region_toggle_hidden(C, rmd->ar);
                                        WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
                                }                               
                                MEM_freeN(op->customdata);
index 9705a36fc754603189174a04bbe6632befba87f8..d2d1d11ec5cbe7137bbeb90b2319aa6145b01990 100644 (file)
@@ -855,13 +855,9 @@ int file_bookmark_toggle_exec(bContext *C, wmOperator *unused)
        ScrArea *sa= CTX_wm_area(C);
        ARegion *ar= file_buttons_region(sa);
        
-       if(ar) {
-               ar->flag ^= RGN_FLAG_HIDDEN;
-               ar->v2d.flag &= ~V2D_IS_INITIALISED; /* XXX should become hide/unhide api? */
-               
-               ED_area_initialize(CTX_wm_manager(C), CTX_wm_window(C), sa);
-               ED_area_tag_redraw(sa);
-       }
+       if(ar)
+               ED_region_toggle_hidden(C, ar);
+
        return OPERATOR_FINISHED;
 }
 
index fb995285ab7a9c37b41a147698cf7deda11b1c03..9aa02b45950466237477b58bcf636cf7fa81044d 100644 (file)
@@ -427,13 +427,9 @@ static int graph_properties(bContext *C, wmOperator *op)
        ScrArea *sa= CTX_wm_area(C);
        ARegion *ar= graph_has_buttons_region(sa);
        
-       if(ar) {
-               ar->flag ^= RGN_FLAG_HIDDEN;
-               ar->v2d.flag &= ~V2D_IS_INITIALISED; /* XXX should become hide/unhide api? */
-               
-               ED_area_initialize(CTX_wm_manager(C), CTX_wm_window(C), sa);
-               ED_area_tag_redraw(sa);
-       }
+       if(ar)
+               ED_region_toggle_hidden(C, ar);
+
        return OPERATOR_FINISHED;
 }
 
index 21fccdc65f8e3c7ad60a1aa13970af3bb23847d3..647b9a4b51f27372f4b6b44244b3218223c5b3d5 100644 (file)
@@ -1452,13 +1452,9 @@ static int image_properties(bContext *C, wmOperator *op)
        ScrArea *sa= CTX_wm_area(C);
        ARegion *ar= image_has_buttons_region(sa);
        
-       if(ar) {
-               ar->flag ^= RGN_FLAG_HIDDEN;
-               ar->v2d.flag &= ~V2D_IS_INITIALISED; /* XXX should become hide/unhide api? */
-               
-               ED_area_initialize(CTX_wm_manager(C), CTX_wm_window(C), sa);
-               ED_area_tag_redraw(sa);
-       }
+       if(ar)
+               ED_region_toggle_hidden(C, ar);
+
        return OPERATOR_FINISHED;
 }
 
index 58c1eddb6c1ecdff2204968ff210a3ba2bbffa9d..304c3601cdd52b78746c03e2624bfda16b010222 100644 (file)
@@ -124,13 +124,9 @@ static int logic_properties(bContext *C, wmOperator *op)
        ScrArea *sa= CTX_wm_area(C);
        ARegion *ar= logic_has_buttons_region(sa);
        
-       if(ar) {
-               ar->flag ^= RGN_FLAG_HIDDEN;
-               ar->v2d.flag &= ~V2D_IS_INITIALISED; /* XXX should become hide/unhide api? */
-               
-               ED_area_initialize(CTX_wm_manager(C), CTX_wm_window(C), sa);
-               ED_area_tag_redraw(sa);
-       }
+       if(ar)
+               ED_region_toggle_hidden(C, ar);
+
        return OPERATOR_FINISHED;
 }
 
index 8532d78aa064150727a216472452fc3c9ad29897..a5ba63fd15d719601769e7590b50e3a5633a1a25 100644 (file)
@@ -458,13 +458,9 @@ static int nla_properties(bContext *C, wmOperator *op)
        ScrArea *sa= CTX_wm_area(C);
        ARegion *ar= nla_has_buttons_region(sa);
        
-       if(ar) {
-               ar->flag ^= RGN_FLAG_HIDDEN;
-               ar->v2d.flag &= ~V2D_IS_INITIALISED; /* XXX should become hide/unhide api? */
-               
-               ED_area_initialize(CTX_wm_manager(C), CTX_wm_window(C), sa);
-               ED_area_tag_redraw(sa);
-       }
+       if(ar)
+               ED_region_toggle_hidden(C, ar);
+
        return OPERATOR_FINISHED;
 }
 
index 789843f54904b2f9e54e003ab3c81019eaa4bf3f..72cbacd9b6d7bdda5e0fb5550a78503ac3c196ad 100644 (file)
@@ -112,13 +112,9 @@ static int sequencer_properties(bContext *C, wmOperator *op)
        ScrArea *sa= CTX_wm_area(C);
        ARegion *ar= sequencer_has_buttons_region(sa);
        
-       if(ar) {
-               ar->flag ^= RGN_FLAG_HIDDEN;
-               ar->v2d.flag &= ~V2D_IS_INITIALISED; /* XXX should become hide/unhide api? */
-               
-               ED_area_initialize(CTX_wm_manager(C), CTX_wm_window(C), sa);
-               ED_area_tag_redraw(sa);
-       }
+       if(ar)
+               ED_region_toggle_hidden(C, ar);
+
        return OPERATOR_FINISHED;
 }
 
index 089436cfcf97dab9d3deb74ff9af94be293e90a5..d0a02f558e12e3acc81deb64eb4f955da5fc6add 100644 (file)
@@ -186,15 +186,6 @@ ARegion *text_has_properties_region(ScrArea *sa)
        return arnew;
 }
 
-void text_toggle_properties_region(bContext *C, ScrArea *sa, ARegion *ar)
-{
-       ar->flag ^= RGN_FLAG_HIDDEN;
-       ar->v2d.flag &= ~V2D_IS_INITIALISED; /* XXX should become hide/unhide api? */
-       
-       ED_area_initialize(CTX_wm_manager(C), CTX_wm_window(C), sa);
-       ED_area_tag_redraw(sa);
-}
-
 static int properties_poll(bContext *C)
 {
        return (CTX_wm_space_text(C) != NULL);
@@ -206,7 +197,7 @@ static int properties_exec(bContext *C, wmOperator *op)
        ARegion *ar= text_has_properties_region(sa);
        
        if(ar)
-               text_toggle_properties_region(C, sa, ar);
+               ED_region_toggle_hidden(C, ar);
 
        return OPERATOR_FINISHED;
 }
index 2250c2e7718dff64b8255bd97101161ed831398f..05bf1c80b434b90dc6ef844b957225cf8636668f 100644 (file)
@@ -190,6 +190,8 @@ static SpaceLink *view3d_new(const bContext *C)
        v3d->lens= 35.0f;
        v3d->near= 0.01f;
        v3d->far= 500.0f;
+
+       v3d->twtype= V3D_MANIP_TRANSLATE;
        
        /* header */
        ar= MEM_callocN(sizeof(ARegion), "header for view3d");
index 54a8c375e69dbcb889bcf51201174ee887b20c3d..1ff5dca73077d77d8120c47dc23c2103b1fd0760 100644 (file)
@@ -1458,13 +1458,9 @@ static int view3d_properties(bContext *C, wmOperator *op)
        ScrArea *sa= CTX_wm_area(C);
        ARegion *ar= view3d_has_buttons_region(sa);
        
-       if(ar) {
-               ar->flag ^= RGN_FLAG_HIDDEN;
-               ar->v2d.flag &= ~V2D_IS_INITIALISED; /* XXX should become hide/unhide api? */
-               
-               ED_area_initialize(CTX_wm_manager(C), CTX_wm_window(C), sa);
-               ED_area_tag_redraw(sa);
-       }
+       if(ar)
+               ED_region_toggle_hidden(C, ar);
+
        return OPERATOR_FINISHED;
 }
 
index b4b54cd1d88ceb1388b1235c04e7979c8d10822c..767f18649fa8c6526cca7c1dd747d2772a8bdc48 100644 (file)
@@ -1122,13 +1122,13 @@ static int snap_menu_invoke(bContext *C, wmOperator *unused, wmEvent *event)
        uiPopupMenu *pup= uiPupMenuBegin(C, "Snap", 0);
        uiLayout *layout= uiPupMenuLayout(pup);
        
-       uiItemO(layout, NULL, 0, "VIEW3D_OT_snap_selected_to_grid");
-       uiItemO(layout, NULL, 0, "VIEW3D_OT_snap_selected_to_cursor");
-       uiItemO(layout, NULL, 0, "VIEW3D_OT_snap_selected_to_center");
+       uiItemO(layout, "Selected to Grid", 0, "VIEW3D_OT_snap_selected_to_grid");
+       uiItemO(layout, "Selected to Cursor", 0, "VIEW3D_OT_snap_selected_to_cursor");
+       uiItemO(layout, "Selected to Center", 0, "VIEW3D_OT_snap_selected_to_center");
        uiItemS(layout);
-       uiItemO(layout, NULL, 0, "VIEW3D_OT_snap_cursor_to_selected");
-       uiItemO(layout, NULL, 0, "VIEW3D_OT_snap_cursor_to_grid");
-       uiItemO(layout, NULL, 0, "VIEW3D_OT_snap_cursor_to_active");
+       uiItemO(layout, "Cursor to Selected", 0, "VIEW3D_OT_snap_cursor_to_selected");
+       uiItemO(layout, "Cursor to Grid", 0, "VIEW3D_OT_snap_cursor_to_grid");
+       uiItemO(layout, "Cursor to Active", 0, "VIEW3D_OT_snap_cursor_to_active");
        
        uiPupMenuEnd(C, pup);
        
index 58248f675dadb5e97fc6526428341a1501a3e738..46341f53c26672b95ced9c01150291a280c66b3c 100644 (file)
@@ -309,13 +309,9 @@ static int view3d_toolbar(bContext *C, wmOperator *op)
        ScrArea *sa= CTX_wm_area(C);
        ARegion *ar= view3d_has_tools_region(sa);
        
-       if(ar) {
-               ar->flag ^= RGN_FLAG_HIDDEN;
-               ar->v2d.flag &= ~V2D_IS_INITIALISED; /* XXX should become hide/unhide api? */
-               
-               ED_area_initialize(CTX_wm_manager(C), CTX_wm_window(C), sa);
-               ED_area_tag_redraw(sa);
-       }
+       if(ar)
+               ED_region_toggle_hidden(C, ar);
+
        return OPERATOR_FINISHED;
 }
 
index a6b089c60291500fcc14d6b2913fe0c78ea8bc8f..8ef52991ca2f75955739c63deb27e7c992f312d3 100644 (file)
@@ -1526,7 +1526,7 @@ static void threaded_tile_processor(Render *re)
        if(re->result==NULL || !(re->r.scemode & R_PREVIEWBUTS)) {
                RE_FreeRenderResult(re->result);
        
-               if(re->sss_points)
+               if(re->sss_points && render_display_draw_enabled(re))
                        re->result= new_render_result(re, &re->disprect, 0, 0);
                else if(re->r.scemode & R_FULL_SAMPLE)
                        re->result= new_full_sample_buffers_exr(re);
index bd022e768f8ac8ecf1e9784b57365b2437e599ce..29f4d7729fe07d818dea1c1dddf876903a1e9019 100644 (file)
@@ -872,12 +872,17 @@ static void sss_create_tree_mat(Render *re, Material *mat)
        re->sss_points= &points;
        re->sss_mat= mat;
        re->i.partsdone= 0;
-       re->result= NULL;
 
-       RE_TileProcessor(re, 0, !(re->r.mode & R_PREVIEWBUTS));
-       RE_FreeRenderResult(re->result);
+       if(!(re->r.scemode & R_PREVIEWBUTS))
+               re->result= NULL;
+
+       RE_TileProcessor(re, 0, 1);
+       
+       if(!(re->r.scemode & R_PREVIEWBUTS)) {
+               RE_FreeRenderResult(re->result);
+               re->result= rr;
+       }
 
-       re->result= rr;
        re->i.partsdone= partsdone;
        re->sss_mat= NULL;
        re->sss_points= NULL;