Sculpt-dev: fix crash

This commit is contained in:
Joseph Eagar 2021-11-16 16:23:42 -08:00
parent 581dc18c08
commit ddd1af5901
2 changed files with 4 additions and 1 deletions

View File

@ -639,6 +639,9 @@ class UnifiedPaintPanel:
row2.label(text=name)
#note we only expose a single icon that toggles between ALWAYS and NEVER
#mode, to lessen user confusion.
#row3 = row2.row(align=True)
#row3.prop_enum(mp0, "inherit_mode", "ALWAYS", icon="BRUSHES_ALL", text="")
#row3.prop_enum(mp0, "inherit_mode", "NEVER", icon="FORWARD", text="")

View File

@ -2036,7 +2036,7 @@ void BKE_sculpt_color_layer_create_if_needed(struct Object *object)
int types[] = {CD_PROP_COLOR, CD_MLOOPCOL};
bool has_color = false;
for (int i = 0; i < 3; i++) {
for (int i = 0; i < ARRAY_SIZE(types); i++) {
bool ok = CustomData_has_layer(&orig_me->vdata, types[i]);
ok = ok || CustomData_has_layer(&orig_me->ldata, types[i]);