diff options
author | Joseph Eagar <joeedh@gmail.com> | 2022-08-31 18:33:23 +0300 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2022-08-31 18:33:23 +0300 |
commit | f987d9b7583c1ce45c6c19eec054d023e12a0f57 (patch) | |
tree | 96d0397d430dbfaae539f830982d0bf0dc7876af /source/blender/editors/mesh/mesh_data.cc | |
parent | 2a13ce1e61d8881d445293a132d087eb8c14bdc3 (diff) | |
parent | a6ba8e5f38dbf62392088c3020aab549b7c80554 (diff) |
Merge branch 'blender-v3.3-release'
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); |