Cycles-Bake: Fix Uninitialised value created by a heap allocation

This was causing some random black bakes. It was introduced in of of the commits replacing calloc by malloc. Things should be better now.

This error was only noticeable when baking the selected objects (not when baking from selected to active).
This commit is contained in:
Dalai Felinto 2015-12-21 15:31:13 -02:00
parent 39d11352e0
commit ee2b583a05
Notes: blender-bot 2023-03-24 17:05:22 +01:00
Referenced by issue #47096, Video Sequence Editor does not update driver values when rendering
Referenced by issue #47089, ViewRotate fails w/ AutoDepth & Cursor Depth
Referenced by issue #47068, Weird deformations on linked meshes modified by a curve
1 changed files with 1 additions and 0 deletions

View File

@ -645,6 +645,7 @@ void RE_bake_pixels_populate(
/* initialize all pixel arrays so we know which ones are 'blank' */
for (i = 0; i < num_pixels; i++) {
pixel_array[i].primitive_id = -1;
pixel_array[i].object_id = 0;
}
for (i = 0; i < bake_images->size; i++) {