Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Eagar <joeedh@gmail.com>2022-08-31 18:26:57 +0300
committerJoseph Eagar <joeedh@gmail.com>2022-08-31 18:29:16 +0300
commita6ba8e5f38dbf62392088c3020aab549b7c80554 (patch)
tree812fbdf7460efad21d3e93816033881072ff0107 /source/blender/editors/mesh
parent0864ab52480c585a7b38e510303d7cd718ba1e38 (diff)
Core: Remove color attribute limit from CustomData API
Note: does not fix the limit in PBVH draw which is caused by VBO limits not MAX_MCOL.
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r--source/blender/editors/mesh/mesh_data.cc20
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 67834bf05ce..c850e2f1e7a 100644
--- a/source/blender/editors/mesh/mesh_data.cc
+++ b/source/blender/editors/mesh/mesh_data.cc
@@ -380,10 +380,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);
@@ -398,10 +394,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(
@@ -523,11 +515,6 @@ int ED_mesh_sculpt_color_add(
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);
@@ -542,12 +529,7 @@ int ED_mesh_sculpt_color_add(
}
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);