diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2014-06-03 07:34:20 +0400 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2014-06-03 09:10:47 +0400 |
commit | b7eff584b0b6d692aabd88192b9e23b6a1a417b6 (patch) | |
tree | f528f42acbc83c944b5c14128a34e33d51831bea | |
parent | e740afe1e6a231f782273061b9c74545fc99494b (diff) |
Bake-API prevent baking for engines that dont support the baking API
In the future we can fallback to the Blender Internal baking.
Review/Suggestions by Campbell Barton
-rw-r--r-- | source/blender/editors/object/object_bake_api.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/editors/object/object_bake_api.c b/source/blender/editors/object/object_bake_api.c index 8baea2493a8..6c084e6f67e 100644 --- a/source/blender/editors/object/object_bake_api.c +++ b/source/blender/editors/object/object_bake_api.c @@ -741,8 +741,8 @@ static int bake( depth, pass_type, result); } else { - ok = RE_bake_internal(re, highpoly[i].ob, highpoly[i].pixel_array, num_pixels, - depth, pass_type, result); + BKE_report(reports, RPT_ERROR, "Current render engine does not support baking"); + goto cleanup; } if (!ok) @@ -773,8 +773,10 @@ static int bake( if (RE_bake_has_engine(re)) ok = RE_bake_engine(re, ob_low, pixel_array_low, num_pixels, depth, pass_type, result); - else - ok = RE_bake_internal(re, ob_low, pixel_array_low, num_pixels, depth, pass_type, result); + else { + BKE_report(reports, RPT_ERROR, "Current render engine does not support baking"); + goto cleanup; + } } /* normal space conversion |