diff options
Diffstat (limited to 'source/blender/editors/mesh/mesh_data.cc')
-rw-r--r-- | source/blender/editors/mesh/mesh_data.cc | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/source/blender/editors/mesh/mesh_data.cc b/source/blender/editors/mesh/mesh_data.cc index e394f8a7251..8e6723f5f0c 100644 --- a/source/blender/editors/mesh/mesh_data.cc +++ b/source/blender/editors/mesh/mesh_data.cc @@ -381,10 +381,6 @@ int ED_mesh_color_add( em = me->edit_mesh; layernum = CustomData_number_of_layers(&em->bm->ldata, CD_PROP_BYTE_COLOR); - if (layernum >= MAX_MCOL) { - BKE_reportf(reports, RPT_WARNING, "Cannot add more than %i vertex color layers", MAX_MCOL); - return -1; - } /* CD_PROP_BYTE_COLOR */ BM_data_layer_add_named(em->bm, &em->bm->ldata, CD_PROP_BYTE_COLOR, name); @@ -399,10 +395,6 @@ int ED_mesh_color_add( } else { layernum = CustomData_number_of_layers(&me->ldata, CD_PROP_BYTE_COLOR); - if (layernum >= MAX_MCOL) { - BKE_reportf(reports, RPT_WARNING, "Cannot add more than %i vertex color layers", MAX_MCOL); - return -1; - } if (me->mloopcol && do_init) { CustomData_add_layer_named( @@ -468,11 +460,6 @@ int ED_mesh_sculpt_color_add(Mesh *me, const char *name, const bool do_init, Rep em = me->edit_mesh; layernum = CustomData_number_of_layers(&em->bm->vdata, CD_PROP_COLOR); - if (layernum >= MAX_MCOL) { - BKE_reportf( - reports, RPT_WARNING, "Cannot add more than %i sculpt vertex color layers", MAX_MCOL); - return -1; - } /* CD_PROP_COLOR */ BM_data_layer_add_named(em->bm, &em->bm->vdata, CD_PROP_COLOR, name); @@ -487,12 +474,7 @@ int ED_mesh_sculpt_color_add(Mesh *me, const char *name, const bool do_init, Rep } else { layernum = CustomData_number_of_layers(&me->vdata, CD_PROP_COLOR); - if (layernum >= MAX_MCOL) { - BKE_reportf( - reports, RPT_WARNING, "Cannot add more than %i sculpt vertex color layers", MAX_MCOL); - return -1; - } - + if (CustomData_has_layer(&me->vdata, CD_PROP_COLOR) && do_init) { const MPropCol *color_data = (const MPropCol *)CustomData_get_layer(&me->vdata, CD_PROP_COLOR); |