diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2018-12-14 13:40:33 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2018-12-14 13:45:54 +0300 |
commit | dc4c1be1a4455e84d1f72ce2703ab7425152965c (patch) | |
tree | 1bf2e689a0d68eae7a34d122b4d72ef96795dc3b /source/blender/editors/object | |
parent | 10508338d8813681f3aaeea3e9a41e91bd84cc15 (diff) |
New object API function : BKE_object_eval_reset()
This restores the object->data to a non-modifier evaluated state.
So this allow us to change evaluated object modifier stack directly and
get BKE_mesh_new_from_object() for the evalauted object.
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r-- | source/blender/editors/object/object_bake_api.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/editors/object/object_bake_api.c b/source/blender/editors/object/object_bake_api.c index 6e7124adc98..dff9ae77417 100644 --- a/source/blender/editors/object/object_bake_api.c +++ b/source/blender/editors/object/object_bake_api.c @@ -844,8 +844,7 @@ static int bake( md = md_next; } - /* We need to restore object->data to a non-modifier-evaluated state. */ - BKE_object_free_derived_caches(ob_low_eval); + BKE_object_eval_reset(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); } |