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-13 21:26:43 +0400
committerDalai Felinto <dfelinto@gmail.com>2014-06-13 21:37:59 +0400
commitb0708dd7189dfef21f7f9af5e98b0a7e1369e507 (patch)
tree4d4a4463b7dd8409f94920b7c06a280374dd8e94 /source/blender/editors/object/object_bake_api.c
parent8957609f353f93475d79706cf2d6b306ed197beb (diff)
Bake-API: handle objects with no faces (fix T40601)
Also it has a better error handling for the BVHTree creation Fix for 2.71
Diffstat (limited to 'source/blender/editors/object/object_bake_api.c')
-rw-r--r--source/blender/editors/object/object_bake_api.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/editors/object/object_bake_api.c b/source/blender/editors/object/object_bake_api.c
index de709a4f03d..8731a606a48 100644
--- a/source/blender/editors/object/object_bake_api.c
+++ b/source/blender/editors/object/object_bake_api.c
@@ -738,9 +738,12 @@ static int bake(
ob_low->restrictflag |= OB_RESTRICT_RENDER;
/* populate the pixel arrays with the corresponding face data for each high poly object */
- RE_bake_pixels_populate_from_objects(
- me_low, pixel_array_low, highpoly, tot_highpoly, num_pixels, ob_cage != NULL,
- cage_extrusion, ob_low->obmat, (ob_cage ? ob_cage->obmat : ob_low->obmat), me_cage);
+ if (!RE_bake_pixels_populate_from_objects(
+ me_low, pixel_array_low, highpoly, tot_highpoly, num_pixels, ob_cage != NULL,
+ cage_extrusion, ob_low->obmat, (ob_cage ? ob_cage->obmat : ob_low->obmat), me_cage)) {
+ BKE_report(reports, RPT_ERROR, "Error handling selected objects");
+ goto cleanup;
+ }
/* the baking itself */
for (i = 0; i < tot_highpoly; i++) {