Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/object/object_bake_api.c
| Show First 20 Lines • Show All 1,018 Lines • ▼ Show 20 Lines | if (is_selected_to_active) { | ||||
| /* the baking itself */ | /* the baking itself */ | ||||
| for (i = 0; i < tot_highpoly; i++) { | for (i = 0; i < tot_highpoly; i++) { | ||||
| ok = RE_bake_engine(re, | ok = RE_bake_engine(re, | ||||
| depsgraph, | depsgraph, | ||||
| highpoly[i].ob, | highpoly[i].ob, | ||||
| i, | i, | ||||
| pixel_array_high, | pixel_array_high, | ||||
| num_pixels, | &bake_images, | ||||
| depth, | depth, | ||||
| pass_type, | pass_type, | ||||
| pass_filter, | pass_filter, | ||||
| result); | result); | ||||
| if (!ok) { | if (!ok) { | ||||
| BKE_reportf( | BKE_reportf( | ||||
| reports, RPT_ERROR, "Error baking from object \"%s\"", highpoly[i].ob->id.name + 2); | reports, RPT_ERROR, "Error baking from object \"%s\"", highpoly[i].ob->id.name + 2); | ||||
| goto cleanup; | goto cleanup; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| else { | else { | ||||
| /* If low poly is not renderable it should have failed long ago. */ | /* If low poly is not renderable it should have failed long ago. */ | ||||
| BLI_assert((ob_low_eval->restrictflag & OB_RESTRICT_RENDER) == 0); | BLI_assert((ob_low_eval->restrictflag & OB_RESTRICT_RENDER) == 0); | ||||
| if (RE_bake_has_engine(re)) { | if (RE_bake_has_engine(re)) { | ||||
| ok = RE_bake_engine(re, | ok = RE_bake_engine(re, | ||||
| depsgraph, | depsgraph, | ||||
| ob_low_eval, | ob_low_eval, | ||||
| 0, | 0, | ||||
| pixel_array_low, | pixel_array_low, | ||||
| num_pixels, | &bake_images, | ||||
| depth, | depth, | ||||
| pass_type, | pass_type, | ||||
| pass_filter, | pass_filter, | ||||
| result); | result); | ||||
| } | } | ||||
| else { | else { | ||||
| BKE_report(reports, RPT_ERROR, "Current render engine does not support baking"); | BKE_report(reports, RPT_ERROR, "Current render engine does not support baking"); | ||||
| goto cleanup; | goto cleanup; | ||||
| ▲ Show 20 Lines • Show All 780 Lines • Show Last 20 Lines | |||||