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>2014-06-03 07:34:20 +0400
committerDalai Felinto <dfelinto@gmail.com>2014-06-03 09:10:47 +0400
commitb7eff584b0b6d692aabd88192b9e23b6a1a417b6 (patch)
treef528f42acbc83c944b5c14128a34e33d51831bea
parente740afe1e6a231f782273061b9c74545fc99494b (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.c10
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