Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/paint.c
| Show First 20 Lines • Show All 1,508 Lines • ▼ Show 20 Lines | else { | ||||
| if (!CustomData_has_layer(&me->ldata, CD_GRID_PAINT_MASK)) { | if (!CustomData_has_layer(&me->ldata, CD_GRID_PAINT_MASK)) { | ||||
| BKE_sculpt_mask_layers_ensure(ob, mmd); | BKE_sculpt_mask_layers_ensure(ob, mmd); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| /* Add a color layer if a color tool is used. */ | /* Add a color layer if a color tool is used. */ | ||||
| Mesh *orig_me = BKE_object_get_original_mesh(ob); | Mesh *orig_me = BKE_object_get_original_mesh(ob); | ||||
| if (need_colors) { | if (need_colors && U.experimental.use_sculpt_vertex_colors) { | ||||
| if (!CustomData_has_layer(&orig_me->vdata, CD_PROP_COLOR)) { | if (!CustomData_has_layer(&orig_me->vdata, CD_PROP_COLOR)) { | ||||
| CustomData_add_layer(&orig_me->vdata, CD_PROP_COLOR, CD_DEFAULT, NULL, orig_me->totvert); | CustomData_add_layer(&orig_me->vdata, CD_PROP_COLOR, CD_DEFAULT, NULL, orig_me->totvert); | ||||
| BKE_mesh_update_customdata_pointers(orig_me, true); | BKE_mesh_update_customdata_pointers(orig_me, true); | ||||
| DEG_id_tag_update(&orig_me->id, ID_RECALC_GEOMETRY); | DEG_id_tag_update(&orig_me->id, ID_RECALC_GEOMETRY); | ||||
| } | } | ||||
| } | } | ||||
| /* tessfaces aren't used and will become invalid */ | /* tessfaces aren't used and will become invalid */ | ||||
| ▲ Show 20 Lines • Show All 439 Lines • Show Last 20 Lines | |||||