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>2017-05-30 15:41:21 +0300
committerDalai Felinto <dfelinto@gmail.com>2017-05-30 20:06:39 +0300
commit2cd7b80cae671baa6552dedd980ba131517605e8 (patch)
tree47630e9184dc0d46018de79e6816b654b3afbb1f /source/blender/render
parent9cae631059c22ad34ee7f74d98ebc42d899757c4 (diff)
Fix T49570: Cycles baking can't handle materials with no images
If users wanted to bake only a few of the mesh materials, they would still need to create dummy textures for the other parts. This commit report (as RPT_INFO) the materials with no texture, but move on to bake the others materials.
Diffstat (limited to 'source/blender/render')
-rw-r--r--source/blender/render/intern/source/bake_api.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/render/intern/source/bake_api.c b/source/blender/render/intern/source/bake_api.c
index 73424a4e846..588c327ab91 100644
--- a/source/blender/render/intern/source/bake_api.c
+++ b/source/blender/render/intern/source/bake_api.c
@@ -684,6 +684,10 @@ void RE_bake_pixels_populate(
int mat_nr = mp->mat_nr;
int image_id = bake_images->lookup[mat_nr];
+ if (image_id < 0) {
+ continue;
+ }
+
bd.bk_image = &bake_images->data[image_id];
bd.primitive_id = ++p_id;