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
This commit is contained in:
Dalai Felinto 2014-06-03 00:34:20 -03:00
parent e740afe1e6
commit b7eff584b0
1 changed files with 6 additions and 4 deletions

View File

@ -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