Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2018-12-14 13:27:37 +0300
committerDalai Felinto <dfelinto@gmail.com>2018-12-14 13:31:24 +0300
commit285cfef695e18a63eba81a385f9fd82bcbccdabc (patch)
treea401b99e74c6f41dbef049c725cfe2767821b779 /source/blender
parent21523b5c8682632b26f80062c6e52ff54cd887d3 (diff)
Fixing crash with cycles baking with is_cage and no cage
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/object/object_bake_api.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/object/object_bake_api.c b/source/blender/editors/object/object_bake_api.c
index 0bff5cb83cb..b3908bd4159 100644
--- a/source/blender/editors/object/object_bake_api.c
+++ b/source/blender/editors/object/object_bake_api.c
@@ -56,6 +56,7 @@
#include "BKE_mesh.h"
#include "BKE_modifier.h"
#include "BKE_node.h"
+#include "BKE_object.h"
#include "BKE_report.h"
#include "BKE_scene.h"
#include "BKE_screen.h"
@@ -843,7 +844,8 @@ static int bake(
md = md_next;
}
- /* get the cage mesh as it arrives in the renderer */
+ /* We need to restore object->data to a non-modifier-evaluated state. */
+ BKE_object_free_derivedderived_caches(ob_low_eval);
me_cage = bake_mesh_new_from_object(depsgraph, bmain, scene, ob_low_eval);
RE_bake_pixels_populate(me_cage, pixel_array_low, num_pixels, &bake_images, uv_layer);
}