diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-09-23 22:26:33 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-09-23 22:26:33 +0400 |
commit | c8343f59d857d4bfde29b1e92e4daaabc1489977 (patch) | |
tree | 93e25f563f8c66a0651edf16277faac4eb3e2435 /source | |
parent | 9b7cc91134b5a173e3afe5b93093e1c3c21310b1 (diff) |
Possible fix for #23947: baking while in editmode did not take into account
changes made to the mesh since entering editmode.
Diffstat (limited to 'source')
-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; |