diff options
author | Joseph Eagar <joeedh@gmail.com> | 2022-04-05 21:42:55 +0300 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2022-04-05 21:42:55 +0300 |
commit | eae36be372a6b16ee3e76eff0485a47da4f3c230 (patch) | |
tree | d1ca2dc30951e31f1b91eed6a4edfdfb0824bf1f /source/blender/makesrna/intern | |
parent | a3e122b9aec59fc303c2375a78183cfb8642c14f (diff) |
Refactor: Unify vertex and sculpt colors into new
color attribute system.
This commit removes sculpt colors from experimental
status and unifies it with vertex colors. It
introduces the concept of "color attributes", which
are any attributes that represents colors. Color
attributes can be represented with byte or floating-point
numbers and can be stored in either vertices or
face corners.
Color attributes share a common namespace
(so you can no longer have a floating-point
sculpt color attribute and a byte vertex color
attribute with the same name).
Note: this commit does not include vertex paint mode,
which is a separate patch, see:
https://developer.blender.org/D14179
Differential Revision: https://developer.blender.org/D12587
Ref D12587
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_attribute.c | 179 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_internal.h | 5 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_modifier.c | 115 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 6 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene_api.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_sculpt_paint.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 4 |
9 files changed, 274 insertions, 45 deletions
diff --git a/source/blender/makesrna/intern/rna_attribute.c b/source/blender/makesrna/intern/rna_attribute.c index f86383a6328..01266a26104 100644 --- a/source/blender/makesrna/intern/rna_attribute.c +++ b/source/blender/makesrna/intern/rna_attribute.c @@ -339,6 +339,12 @@ static int rna_Attributes_layer_skip(CollectionPropertyIterator *UNUSED(iter), v return !(CD_TYPE_AS_MASK(layer->type) & CD_MASK_PROP_ALL); } +static int rna_Attributes_noncolor_layer_skip(CollectionPropertyIterator *UNUSED(iter), void *data) +{ + CustomDataLayer *layer = (CustomDataLayer *)data; + return !(CD_TYPE_AS_MASK(layer->type) & CD_MASK_COLOR_ALL) || (layer->flag & CD_FLAG_TEMPORARY); +} + /* Attributes are spread over multiple domains in separate CustomData, we use repeated * array iterators to loop over all. */ static void rna_AttributeGroup_next_domain(ID *id, @@ -377,7 +383,34 @@ void rna_AttributeGroup_iterator_next(CollectionPropertyIterator *iter) PointerRNA rna_AttributeGroup_iterator_get(CollectionPropertyIterator *iter) { - /* refine to the proper type */ + /* Refine to the proper type. */ + CustomDataLayer *layer = rna_iterator_array_get(iter); + StructRNA *type = srna_by_custom_data_layer_type(layer->type); + if (type == NULL) { + return PointerRNA_NULL; + } + return rna_pointer_inherit_refine(&iter->parent, type, layer); +} + +void rna_AttributeGroup_color_iterator_begin(CollectionPropertyIterator *iter, PointerRNA *ptr) +{ + memset(&iter->internal.array, 0, sizeof(iter->internal.array)); + rna_AttributeGroup_next_domain(ptr->owner_id, iter, rna_Attributes_noncolor_layer_skip); +} + +void rna_AttributeGroup_color_iterator_next(CollectionPropertyIterator *iter) +{ + rna_iterator_array_next(iter); + + if (!iter->valid) { + ID *id = iter->parent.owner_id; + rna_AttributeGroup_next_domain(id, iter, rna_Attributes_noncolor_layer_skip); + } +} + +PointerRNA rna_AttributeGroup_color_iterator_get(CollectionPropertyIterator *iter) +{ + /* Refine to the proper type. */ CustomDataLayer *layer = rna_iterator_array_get(iter); StructRNA *type = srna_by_custom_data_layer_type(layer->type); if (type == NULL) { @@ -386,9 +419,16 @@ PointerRNA rna_AttributeGroup_iterator_get(CollectionPropertyIterator *iter) return rna_pointer_inherit_refine(&iter->parent, type, layer); } +int rna_AttributeGroup_color_length(PointerRNA *ptr) +{ + return BKE_id_attributes_length(ptr->owner_id, + ATTR_DOMAIN_MASK_POINT | ATTR_DOMAIN_MASK_CORNER, + CD_MASK_PROP_COLOR | CD_MASK_MLOOPCOL); +} + int rna_AttributeGroup_length(PointerRNA *ptr) { - return BKE_id_attributes_length(ptr->owner_id, CD_MASK_PROP_ALL); + return BKE_id_attributes_length(ptr->owner_id, ATTR_DOMAIN_MASK_ALL, CD_MASK_PROP_ALL); } static int rna_AttributeGroup_active_index_get(PointerRNA *ptr) @@ -424,7 +464,7 @@ static void rna_AttributeGroup_active_index_range( PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax) { *min = 0; - *max = BKE_id_attributes_length(ptr->owner_id, CD_MASK_PROP_ALL); + *max = BKE_id_attributes_length(ptr->owner_id, ATTR_DOMAIN_MASK_ALL, CD_MASK_PROP_ALL); *softmin = *min; *softmax = *max; @@ -435,6 +475,98 @@ static void rna_AttributeGroup_update_active(Main *bmain, Scene *scene, PointerR rna_Attribute_update_data(bmain, scene, ptr); } +static PointerRNA rna_AttributeGroup_active_color_get(PointerRNA *ptr) +{ + ID *id = ptr->owner_id; + CustomDataLayer *layer = BKE_id_attributes_active_color_get(id); + + PointerRNA attribute_ptr; + RNA_pointer_create(id, &RNA_Attribute, layer, &attribute_ptr); + return attribute_ptr; +} + +static void rna_AttributeGroup_active_color_set(PointerRNA *ptr, + PointerRNA attribute_ptr, + ReportList *UNUSED(reports)) +{ + ID *id = ptr->owner_id; + CustomDataLayer *layer = attribute_ptr.data; + + BKE_id_attributes_active_color_set(id, layer); +} + +static int rna_AttributeGroup_active_color_index_get(PointerRNA *ptr) +{ + CustomDataLayer *layer = BKE_id_attributes_active_color_get(ptr->owner_id); + + return BKE_id_attribute_to_index( + ptr->owner_id, layer, ATTR_DOMAIN_MASK_COLOR, CD_MASK_COLOR_ALL); +} + +static void rna_AttributeGroup_active_color_index_set(PointerRNA *ptr, int value) +{ + CustomDataLayer *layer = BKE_id_attribute_from_index( + ptr->owner_id, value, ATTR_DOMAIN_MASK_COLOR, CD_MASK_COLOR_ALL); + + if (!layer) { + fprintf(stderr, "%s: error setting active color index to %d\n", __func__, value); + return; + } + + BKE_id_attributes_active_color_set(ptr->owner_id, layer); +} + +static void rna_AttributeGroup_active_color_index_range( + PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax) +{ + *min = 0; + *max = BKE_id_attributes_length(ptr->owner_id, ATTR_DOMAIN_MASK_COLOR, CD_MASK_COLOR_ALL); + + *softmin = *min; + *softmax = *max; +} + +static void rna_AttributeGroup_update_active_color(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) +{ + ID *id = ptr->owner_id; + + /* Cheating way for importers to avoid slow updates. */ + if (id->us > 0) { + DEG_id_tag_update(id, 0); + WM_main_add_notifier(NC_GEOM | ND_DATA, id); + } +} + +static int rna_AttributeGroup_render_color_index_get(PointerRNA *ptr) +{ + CustomDataLayer *layer = BKE_id_attributes_render_color_get(ptr->owner_id); + + return BKE_id_attribute_to_index( + ptr->owner_id, layer, ATTR_DOMAIN_MASK_COLOR, CD_MASK_COLOR_ALL); +} + +static void rna_AttributeGroup_render_color_index_set(PointerRNA *ptr, int value) +{ + CustomDataLayer *layer = BKE_id_attribute_from_index( + ptr->owner_id, value, ATTR_DOMAIN_MASK_COLOR, CD_MASK_COLOR_ALL); + + if (!layer) { + fprintf(stderr, "%s: error setting render color index to %d\n", __func__, value); + return; + } + + BKE_id_attributes_render_color_set(ptr->owner_id, layer); +} + +static void rna_AttributeGroup_render_color_index_range( + PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax) +{ + *min = 0; + *max = BKE_id_attributes_length(ptr->owner_id, ATTR_DOMAIN_MASK_COLOR, CD_MASK_COLOR_ALL); + + *softmin = *min; + *softmax = *max; +} #else static void rna_def_attribute_float(BlenderRNA *brna) @@ -826,6 +958,33 @@ static void rna_def_attribute_group(BlenderRNA *brna) "rna_AttributeGroup_active_index_set", "rna_AttributeGroup_active_index_range"); RNA_def_property_update(prop, 0, "rna_AttributeGroup_update_active"); + + prop = RNA_def_property(srna, "active_color", PROP_POINTER, PROP_NONE); + RNA_def_property_struct_type(prop, "Attribute"); + RNA_def_property_pointer_funcs(prop, + "rna_AttributeGroup_active_color_get", + "rna_AttributeGroup_active_color_set", + NULL, + NULL); + RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_UNLINK); + RNA_def_property_ui_text(prop, "Active Color", "Active color attribute"); + RNA_def_property_update(prop, 0, "rna_AttributeGroup_update_active_color"); + + prop = RNA_def_property(srna, "active_color_index", PROP_INT, PROP_NONE); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); + RNA_def_property_int_funcs(prop, + "rna_AttributeGroup_active_color_index_get", + "rna_AttributeGroup_active_color_index_set", + "rna_AttributeGroup_active_color_index_range"); + RNA_def_property_update(prop, 0, "rna_AttributeGroup_update_active_color"); + + prop = RNA_def_property(srna, "render_color_index", PROP_INT, PROP_NONE); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); + RNA_def_property_int_funcs(prop, + "rna_AttributeGroup_render_color_index_get", + "rna_AttributeGroup_render_color_index_set", + "rna_AttributeGroup_render_color_index_range"); + RNA_def_property_update(prop, 0, "rna_AttributeGroup_update_active_color"); } void rna_def_attributes_common(StructRNA *srna) @@ -846,6 +1005,20 @@ void rna_def_attributes_common(StructRNA *srna) RNA_def_property_struct_type(prop, "Attribute"); RNA_def_property_ui_text(prop, "Attributes", "Geometry attributes"); RNA_def_property_srna(prop, "AttributeGroup"); + + prop = RNA_def_property(srna, "color_attributes", PROP_COLLECTION, PROP_NONE); + RNA_def_property_collection_funcs(prop, + "rna_AttributeGroup_color_iterator_begin", + "rna_AttributeGroup_color_iterator_next", + "rna_iterator_array_end", + "rna_AttributeGroup_color_iterator_get", + "rna_AttributeGroup_color_length", + NULL, + NULL, + NULL); + RNA_def_property_struct_type(prop, "Attribute"); + RNA_def_property_ui_text(prop, "Color Attributes", "Geometry color attributes"); + RNA_def_property_srna(prop, "AttributeGroup"); } void RNA_def_attribute(BlenderRNA *brna) diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h index 0df0be07fee..ba040f88b55 100644 --- a/source/blender/makesrna/intern/rna_internal.h +++ b/source/blender/makesrna/intern/rna_internal.h @@ -217,6 +217,11 @@ void rna_AttributeGroup_iterator_next(CollectionPropertyIterator *iter); PointerRNA rna_AttributeGroup_iterator_get(CollectionPropertyIterator *iter); int rna_AttributeGroup_length(PointerRNA *ptr); +void rna_AttributeGroup_color_iterator_begin(CollectionPropertyIterator *iter, PointerRNA *ptr); +void rna_AttributeGroup_color_iterator_next(CollectionPropertyIterator *iter); +PointerRNA rna_AttributeGroup_color_iterator_get(CollectionPropertyIterator *iter); +int rna_AttributeGroup_color_length(PointerRNA *ptr); + void rna_def_animdata_common(struct StructRNA *srna); bool rna_AnimaData_override_apply(struct Main *bmain, diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 4f9a10c9993..54031f5a416 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -23,6 +23,7 @@ #include "BLT_translation.h" #include "BKE_animsys.h" +#include "BKE_attribute.h" #include "BKE_curveprofile.h" #include "BKE_data_transfer.h" #include "BKE_dynamicpaint.h" @@ -1360,29 +1361,47 @@ static const EnumPropertyItem *rna_DataTransferModifier_layers_select_src_itemf( } } } - else if (STREQ(RNA_property_identifier(prop), "layers_vcol_select_src")) { + else if (STREQ(RNA_property_identifier(prop), "layers_vcol_select_vert_src") || + STREQ(RNA_property_identifier(prop), "layers_vcol_select_loop_src")) { Object *ob_src = dtmd->ob_source; if (ob_src) { - Mesh *me_eval; - int num_data, i; + AttributeDomain domain = STREQ(RNA_property_identifier(prop), + "layers_vcol_select_vert_src") ? + ATTR_DOMAIN_POINT : + ATTR_DOMAIN_CORNER; Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); Scene *scene_eval = DEG_get_evaluated_scene(depsgraph); Object *ob_src_eval = DEG_get_evaluated_object(depsgraph, ob_src); CustomData_MeshMasks cddata_masks = CD_MASK_BAREMESH; - cddata_masks.lmask |= CD_MASK_MLOOPCOL; - me_eval = mesh_get_eval_final(depsgraph, scene_eval, ob_src_eval, &cddata_masks); - num_data = CustomData_number_of_layers(&me_eval->ldata, CD_MLOOPCOL); + CustomData *cdata; - RNA_enum_item_add_separator(&item, &totitem); + Mesh *me_eval = mesh_get_eval_final(depsgraph, scene_eval, ob_src_eval, &cddata_masks); - for (i = 0; i < num_data; i++) { - tmp_item.value = i; - tmp_item.identifier = tmp_item.name = CustomData_get_layer_name( - &me_eval->ldata, CD_MLOOPCOL, i); - RNA_enum_item_add(&item, &totitem, &tmp_item); + if (domain == ATTR_DOMAIN_POINT) { + cddata_masks.vmask |= CD_MASK_COLOR_ALL; + cdata = &me_eval->vdata; + } + else { + cddata_masks.lmask |= CD_MASK_COLOR_ALL; + cdata = &me_eval->ldata; + } + + CustomDataType types[2] = {CD_PROP_COLOR, CD_MLOOPCOL}; + + int idx = 0; + for (int i = 0; i < 2; i++) { + int num_data = CustomData_number_of_layers(cdata, types[i]); + + RNA_enum_item_add_separator(&item, &totitem); + + for (int j = 0; j < num_data; j++) { + tmp_item.value = idx++; + tmp_item.identifier = tmp_item.name = CustomData_get_layer_name(cdata, types[i], j); + RNA_enum_item_add(&item, &totitem, &tmp_item); + } } } } @@ -1459,26 +1478,31 @@ static const EnumPropertyItem *rna_DataTransferModifier_layers_select_dst_itemf( } } } - else if (STREQ(RNA_property_identifier(prop), "layers_vcol_select_dst")) { + else if (STREQ(RNA_property_identifier(prop), "layers_vcol_vert_select_dst") || + STREQ(RNA_property_identifier(prop), "layers_vcol_loop_select_dst")) { /* Only list destination layers if we have a single source! */ - if (dtmd->layers_select_src[DT_MULTILAYER_INDEX_VCOL] >= 0) { + if (dtmd->layers_select_src[DT_MULTILAYER_INDEX_VCOL_LOOP] >= 0) { Object *ob_dst = CTX_data_active_object(C); /* XXX Is this OK? */ if (ob_dst && ob_dst->data) { - Mesh *me_dst; - CustomData *ldata; - int num_data, i; + CustomDataType types[2] = {CD_PROP_COLOR, CD_MLOOPCOL}; - me_dst = ob_dst->data; - ldata = &me_dst->ldata; - num_data = CustomData_number_of_layers(ldata, CD_MLOOPCOL); + Mesh *me_dst = ob_dst->data; + CustomData *cdata = STREQ(RNA_property_identifier(prop), "layers_vcol_vert_select_dst") ? + &me_dst->vdata : + &me_dst->ldata; - RNA_enum_item_add_separator(&item, &totitem); + int idx = 0; + for (int i = 0; i < 2; i++) { + int num_data = CustomData_number_of_layers(cdata, types[i]); - for (i = 0; i < num_data; i++) { - tmp_item.value = i; - tmp_item.identifier = tmp_item.name = CustomData_get_layer_name(ldata, CD_MLOOPCOL, i); - RNA_enum_item_add(&item, &totitem, &tmp_item); + RNA_enum_item_add_separator(&item, &totitem); + + for (int j = 0; j < num_data; j++) { + tmp_item.value = idx++; + tmp_item.identifier = tmp_item.name = CustomData_get_layer_name(cdata, types[i], j); + RNA_enum_item_add(&item, &totitem, &tmp_item); + } } } } @@ -6330,6 +6354,11 @@ static void rna_def_modifier_datatransfer(BlenderRNA *brna) {DT_TYPE_SKIN, "SKIN", 0, "Skin Weight", "Transfer skin weights"}, # endif {DT_TYPE_BWEIGHT_VERT, "BEVEL_WEIGHT_VERT", 0, "Bevel Weight", "Transfer bevel weights"}, + {DT_TYPE_MPROPCOL_VERT | DT_TYPE_MLOOPCOL_VERT, + "VCOL", + 0, + "Colors", + "Transfer color attributes"}, {0, NULL, 0, NULL, NULL}, }; @@ -6344,7 +6373,11 @@ static void rna_def_modifier_datatransfer(BlenderRNA *brna) static const EnumPropertyItem DT_layer_loop_items[] = { {DT_TYPE_LNOR, "CUSTOM_NORMAL", 0, "Custom Normals", "Transfer custom normals"}, - {DT_TYPE_VCOL, "VCOL", 0, "Vertex Colors", "Vertex (face corners) colors"}, + {DT_TYPE_MPROPCOL_LOOP | DT_TYPE_MLOOPCOL_LOOP, + "VCOL", + 0, + "Colors", + "Transfer color attributes"}, {DT_TYPE_UV, "UV", 0, "UVs", "Transfer UV layers"}, {0, NULL, 0, NULL, NULL}, }; @@ -6562,12 +6595,23 @@ static void rna_def_modifier_datatransfer(BlenderRNA *brna) # endif prop = RNA_def_enum(srna, - "layers_vcol_select_src", + "layers_vcol_vert_select_src", rna_enum_dt_layers_select_src_items, DT_LAYERS_ALL_SRC, "Source Layers Selection", "Which layers to transfer, in case of multi-layers types"); - RNA_def_property_enum_sdna(prop, NULL, "layers_select_src[DT_MULTILAYER_INDEX_VCOL]"); + RNA_def_property_enum_sdna(prop, NULL, "layers_select_src[DT_MULTILAYER_INDEX_VCOL_VERT]"); + RNA_def_property_enum_funcs( + prop, NULL, NULL, "rna_DataTransferModifier_layers_select_src_itemf"); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop = RNA_def_enum(srna, + "layers_vcol_loop_select_src", + rna_enum_dt_layers_select_src_items, + DT_LAYERS_ALL_SRC, + "Source Layers Selection", + "Which layers to transfer, in case of multi-layers types"); + RNA_def_property_enum_sdna(prop, NULL, "layers_select_src[DT_MULTILAYER_INDEX_VCOL_LOOP]"); RNA_def_property_enum_funcs( prop, NULL, NULL, "rna_DataTransferModifier_layers_select_src_itemf"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); @@ -6608,12 +6652,23 @@ static void rna_def_modifier_datatransfer(BlenderRNA *brna) # endif prop = RNA_def_enum(srna, - "layers_vcol_select_dst", + "layers_vcol_vert_select_dst", + rna_enum_dt_layers_select_dst_items, + DT_LAYERS_NAME_DST, + "Destination Layers Matching", + "How to match source and destination layers"); + RNA_def_property_enum_sdna(prop, NULL, "layers_select_dst[DT_MULTILAYER_INDEX_VCOL_VERT]"); + RNA_def_property_enum_funcs( + prop, NULL, NULL, "rna_DataTransferModifier_layers_select_dst_itemf"); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop = RNA_def_enum(srna, + "layers_vcol_loop_select_dst", rna_enum_dt_layers_select_dst_items, DT_LAYERS_NAME_DST, "Destination Layers Matching", "How to match source and destination layers"); - RNA_def_property_enum_sdna(prop, NULL, "layers_select_dst[DT_MULTILAYER_INDEX_VCOL]"); + RNA_def_property_enum_sdna(prop, NULL, "layers_select_dst[DT_MULTILAYER_INDEX_VCOL_LOOP]"); RNA_def_property_enum_funcs( prop, NULL, NULL, "rna_DataTransferModifier_layers_select_dst_itemf"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 70b335446fc..cbac6aefc10 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -6056,7 +6056,7 @@ static void def_sh_vertex_color(StructRNA *srna) RNA_def_struct_sdna_from(srna, "NodeShaderVertexColor", "storage"); prop = RNA_def_property(srna, "layer_name", PROP_STRING, PROP_NONE); - RNA_def_property_ui_text(prop, "Vertex Color", "Vertex Color"); + RNA_def_property_ui_text(prop, "Color Attribute", "Color Attribute"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); RNA_def_struct_sdna_from(srna, "bNode", NULL); diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 0960d246257..7095d8a4172 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -447,8 +447,8 @@ const EnumPropertyItem rna_enum_bake_target_items[] = { {R_BAKE_TARGET_VERTEX_COLORS, "VERTEX_COLORS", 0, - "Vertex Colors", - "Bake to active vertex color layer on meshes"}, + "Color Attributes", + "Bake to active color attribute layer on meshes"}, {0, NULL, 0, NULL, NULL}, }; @@ -3204,7 +3204,7 @@ static void rna_def_tool_settings(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "uvcalc_flag", UVCALC_TRANSFORM_CORRECT); RNA_def_property_ui_text(prop, "Correct Face Attributes", - "Correct data such as UV's and vertex colors when transforming"); + "Correct data such as UV's and color attributes when transforming"); RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); prop = RNA_def_property(srna, "use_transform_correct_keep_connected", PROP_BOOLEAN, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c index 75b41e4c7b9..200e1d65caf 100644 --- a/source/blender/makesrna/intern/rna_scene_api.c +++ b/source/blender/makesrna/intern/rna_scene_api.c @@ -357,7 +357,7 @@ void RNA_api_scene(StructRNA *srna) RNA_def_boolean(func, "selected_only", 0, "Selected only", "Export only selected objects"); RNA_def_boolean(func, "uvs", 1, "UVs", "Export UVs"); RNA_def_boolean(func, "normals", 1, "Normals", "Export normals"); - RNA_def_boolean(func, "vcolors", 0, "Vertex colors", "Export vertex colors"); + RNA_def_boolean(func, "vcolors", 0, "Color Attributes", "Export color attributes"); RNA_def_boolean( func, "apply_subdiv", 1, "Subsurfs as meshes", "Export subdivision surfaces as meshes"); RNA_def_boolean(func, "flatten", 0, "Flatten hierarchy", "Flatten hierarchy"); diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c index 97e1f325816..1ea7b35cedb 100644 --- a/source/blender/makesrna/intern/rna_sculpt_paint.c +++ b/source/blender/makesrna/intern/rna_sculpt_paint.c @@ -78,8 +78,8 @@ static const EnumPropertyItem rna_enum_gpencil_paint_mode[] = { {GPPAINT_FLAG_USE_VERTEXCOLOR, "VERTEXCOLOR", 0, - "Vertex Color", - "Paint the material with custom vertex color"}, + "Color Attribute", + "Paint the material with a color attribute"}, {0, NULL, 0, NULL, NULL}, }; #endif diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index ff272c34c65..a74019f9569 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -424,7 +424,7 @@ static const EnumPropertyItem rna_enum_shading_color_type_items[] = { {V3D_SHADING_SINGLE_COLOR, "SINGLE", 0, "Single", "Show scene in a single color"}, {V3D_SHADING_OBJECT_COLOR, "OBJECT", 0, "Object", "Show object color"}, {V3D_SHADING_RANDOM_COLOR, "RANDOM", 0, "Random", "Show random object color"}, - {V3D_SHADING_VERTEX_COLOR, "VERTEX", 0, "Vertex", "Show active vertex color"}, + {V3D_SHADING_VERTEX_COLOR, "VERTEX", 0, "Color", "Show active color attribute"}, {V3D_SHADING_TEXTURE_COLOR, "TEXTURE", 0, "Texture", "Show texture"}, {0, NULL, 0, NULL, NULL}, }; diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index cbc13943c1f..cf622818a3d 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -6399,10 +6399,6 @@ static void rna_def_userdef_experimental(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Cycles Debug", "Enable Cycles debugging options for developers"); RNA_def_property_update(prop, 0, "rna_userdef_update"); - prop = RNA_def_property(srna, "use_sculpt_vertex_colors", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "use_sculpt_vertex_colors", 1); - RNA_def_property_ui_text(prop, "Sculpt Vertex Colors", "Use the new Vertex Painting system"); - prop = RNA_def_property(srna, "use_sculpt_tools_tilt", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "use_sculpt_tools_tilt", 1); RNA_def_property_ui_text( |