Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/object/object_bake_api.c
| Show First 20 Lines • Show All 435 Lines • ▼ Show 20 Lines | static bool bake_object_check(ViewLayer *view_layer, | ||||
| } | } | ||||
| if (ob->type != OB_MESH) { | if (ob->type != OB_MESH) { | ||||
| BKE_reportf(reports, RPT_ERROR, "Object \"%s\" is not a mesh", ob->id.name + 2); | BKE_reportf(reports, RPT_ERROR, "Object \"%s\" is not a mesh", ob->id.name + 2); | ||||
| return false; | return false; | ||||
| } | } | ||||
| Mesh *me = (Mesh *)ob->data; | Mesh *me = (Mesh *)ob->data; | ||||
| if (me->totpoly == 0) { | |||||
| BKE_reportf(reports, RPT_ERROR, "No faces found in the object \"%s\"", ob->id.name + 2); | |||||
| return false; | |||||
| } | |||||
| if (target == R_BAKE_TARGET_VERTEX_COLORS) { | if (target == R_BAKE_TARGET_VERTEX_COLORS) { | ||||
| MPropCol *mcol = CustomData_get_layer(&me->vdata, CD_PROP_COLOR); | MPropCol *mcol = CustomData_get_layer(&me->vdata, CD_PROP_COLOR); | ||||
| MLoopCol *mloopcol = CustomData_get_layer(&me->ldata, CD_MLOOPCOL); | MLoopCol *mloopcol = CustomData_get_layer(&me->ldata, CD_MLOOPCOL); | ||||
| if (mcol == NULL && mloopcol == NULL) { | if (mcol == NULL && mloopcol == NULL) { | ||||
| BKE_reportf(reports, | BKE_reportf(reports, | ||||
| RPT_ERROR, | RPT_ERROR, | ||||
| "No vertex colors layer found in the object \"%s\"", | "No vertex colors layer found in the object \"%s\"", | ||||
| ob->id.name + 2); | ob->id.name + 2); | ||||
| ▲ Show 20 Lines • Show All 1,577 Lines • Show Last 20 Lines | |||||