Bake-API: removal of unecessary UV tests, as suggested by Campbell Barton
authorDalai Felinto <dfelinto@gmail.com>
Tue, 10 Jun 2014 23:50:55 +0000 (20:50 -0300)
committerDalai Felinto <dfelinto@gmail.com>
Tue, 10 Jun 2014 23:51:34 +0000 (20:51 -0300)
source/blender/editors/object/object_bake_api.c

index 9075ca26e40e6e8d34b0e1f764ae0fa542a697ed..cd40262fe6b24834efd9eb7e4655a407697df106 100644 (file)
@@ -302,11 +302,7 @@ static bool bake_object_check(Object *ob, ReportList *reports)
        else {
                Mesh *me = (Mesh *)ob->data;
 
-               const int pidx = CustomData_get_active_layer_index(&me->pdata, CD_MTEXPOLY);
-               const int lidx = CustomData_get_active_layer_index(&me->ldata, CD_MLOOPUV);
-               const int fidx = CustomData_get_active_layer_index(&me->fdata, CD_MTFACE);
-
-               if ((pidx == -1) && (lidx == -1) && (fidx == -1)) {
+               if (CustomData_get_active_layer_index(&me->ldata, CD_MLOOPUV)) {
                        BKE_reportf(reports, RPT_ERROR,
                                    "No active UV layer found in the object \"%s\"", ob->id.name + 2);
                        return false;