diff options
-rw-r--r-- | source/blender/editors/object/object_bake.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/editors/object/object_bake.c b/source/blender/editors/object/object_bake.c index aaeddc61772..76b297b52b1 100644 --- a/source/blender/editors/object/object_bake.c +++ b/source/blender/editors/object/object_bake.c @@ -48,6 +48,7 @@ #include "BKE_global.h" #include "BKE_image.h" #include "BKE_main.h" +#include "BKE_multires.h" #include "BKE_report.h" #include "RE_pipeline.h" @@ -63,6 +64,7 @@ #include "WM_api.h" #include "WM_types.h" +#include "ED_object.h" /* ****************** render BAKING ********************** */ @@ -137,6 +139,12 @@ static void init_bake_internal(BakeRender *bkr, bContext *C) { Scene *scene= CTX_data_scene(C); + /* flush multires changes (for sculpt) */ + multires_force_render_update(CTX_data_active_object(C)); + + /* get editmode results */ + ED_object_exit_editmode(C, 0); /* 0 = does not exit editmode */ + bkr->sa= biggest_image_area(CTX_wm_screen(C)); /* can be NULL */ bkr->main= CTX_data_main(C); bkr->scene= scene; |