Merge branch 'blender-v3.3-release'
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user