diff --git a/release/scripts/startup/bl_ui/properties_data_mesh.py b/release/scripts/startup/bl_ui/properties_data_mesh.py index d7c885cf870..050bf56966f 100644 --- a/release/scripts/startup/bl_ui/properties_data_mesh.py +++ b/release/scripts/startup/bl_ui/properties_data_mesh.py @@ -600,7 +600,7 @@ class MESH_UL_color_attributes(UIList, ColorAttributesListBase): split = layout.split(factor=0.50) split.emboss = 'NONE' - split.prop(attribute, "name", text="") + split.prop(attribute, "name", text="", icon='GROUP_VCOL') sub = split.row() sub.alignment = 'RIGHT' @@ -620,9 +620,9 @@ class MESH_UL_color_attributes(UIList, ColorAttributesListBase): class MESH_UL_color_attributes_selector(UIList, ColorAttributesListBase): - def draw_item(self, _context, layout, data, attribute, _icon, _active_data, _active_propname, _index): + def draw_item(self, _context, layout, _data, attribute, _icon, _active_data, _active_propname, _index): layout.emboss = 'NONE' - layout.prop(attribute, "name", text="", icon='COLOR') + layout.prop(attribute, "name", text="", icon='GROUP_VCOL') class DATA_PT_vertex_colors(DATA_PT_mesh_attributes, Panel): diff --git a/source/blender/editors/geometry/geometry_attributes.cc b/source/blender/editors/geometry/geometry_attributes.cc index b1c05cf44b1..7bba297af8c 100644 --- a/source/blender/editors/geometry/geometry_attributes.cc +++ b/source/blender/editors/geometry/geometry_attributes.cc @@ -136,7 +136,7 @@ static void next_color_attributes(struct ID *id, CustomDataLayer *layer) void GEOMETRY_OT_attribute_add(wmOperatorType *ot) { /* identifiers */ - ot->name = "Add Geometry Attribute"; + ot->name = "Add Attribute"; ot->description = "Add attribute to geometry"; ot->idname = "GEOMETRY_OT_attribute_add"; @@ -198,7 +198,7 @@ static int geometry_attribute_remove_exec(bContext *C, wmOperator *op) void GEOMETRY_OT_attribute_remove(wmOperatorType *ot) { /* identifiers */ - ot->name = "Remove Geometry Attribute"; + ot->name = "Remove Attribute"; ot->description = "Remove attribute from geometry"; ot->idname = "GEOMETRY_OT_attribute_remove"; @@ -358,8 +358,8 @@ static void geometry_color_attribute_add_ui(bContext *UNUSED(C), wmOperator *op) void GEOMETRY_OT_color_attribute_add(wmOperatorType *ot) { /* identifiers */ - ot->name = "Add Geometry Attribute"; - ot->description = "Add attribute to geometry"; + ot->name = "Add Color Attribute"; + ot->description = "Add color attribute to geometry"; ot->idname = "GEOMETRY_OT_color_attribute_add"; /* api callbacks */ @@ -374,7 +374,8 @@ void GEOMETRY_OT_color_attribute_add(wmOperatorType *ot) /* properties */ PropertyRNA *prop; - prop = RNA_def_string(ot->srna, "name", "Color", MAX_NAME, "Name", "Name of color attribute"); + prop = RNA_def_string( + ot->srna, "name", "Color", MAX_NAME, "Name", "Name of new color attribute"); RNA_def_property_flag(prop, PROP_SKIP_SAVE); static EnumPropertyItem domains[3] = {{ATTR_DOMAIN_POINT, "POINT", 0, "Vertex", ""}, @@ -428,7 +429,7 @@ static int geometry_color_attribute_set_render_exec(bContext *C, wmOperator *op) void GEOMETRY_OT_color_attribute_render_set(wmOperatorType *ot) { /* identifiers */ - ot->name = "Set Render Color Attribute"; + ot->name = "Set Render Color"; ot->description = "Set default color attribute used for rendering"; ot->idname = "GEOMETRY_OT_color_attribute_render_set"; diff --git a/source/blender/makesrna/intern/rna_attribute.c b/source/blender/makesrna/intern/rna_attribute.c index 5efbebc9b97..d49bac15242 100644 --- a/source/blender/makesrna/intern/rna_attribute.c +++ b/source/blender/makesrna/intern/rna_attribute.c @@ -27,8 +27,12 @@ const EnumPropertyItem rna_enum_attribute_type_items[] = { {CD_PROP_FLOAT, "FLOAT", 0, "Float", "Floating-point value"}, {CD_PROP_INT32, "INT", 0, "Integer", "32-bit integer"}, {CD_PROP_FLOAT3, "FLOAT_VECTOR", 0, "Vector", "3D vector with floating-point values"}, - {CD_PROP_COLOR, "FLOAT_COLOR", 0, "Color", "RGBA color with floating-point values"}, - {CD_PROP_BYTE_COLOR, "BYTE_COLOR", 0, "Byte Color", "RGBA color with 8-bit values"}, + {CD_PROP_COLOR, "FLOAT_COLOR", 0, "Color", "RGBA color with 32-bit floating-point values"}, + {CD_PROP_BYTE_COLOR, + "BYTE_COLOR", + 0, + "Byte Color", + "RGBA color with 8-bit positive integer values"}, {CD_PROP_STRING, "STRING", 0, "String", "Text string"}, {CD_PROP_BOOL, "BOOLEAN", 0, "Boolean", "True or false"}, {CD_PROP_FLOAT2, "FLOAT2", 0, "2D Vector", "2D vector with floating-point values"}, @@ -41,8 +45,12 @@ const EnumPropertyItem rna_enum_attribute_type_with_auto_items[] = { {CD_PROP_FLOAT, "FLOAT", 0, "Float", "Floating-point value"}, {CD_PROP_INT32, "INT", 0, "Integer", "32-bit integer"}, {CD_PROP_FLOAT3, "FLOAT_VECTOR", 0, "Vector", "3D vector with floating-point values"}, - {CD_PROP_COLOR, "FLOAT_COLOR", 0, "Color", "RGBA color with floating-point values"}, - {CD_PROP_BYTE_COLOR, "BYTE_COLOR", 0, "Byte Color", "RGBA color with 8-bit values"}, + {CD_PROP_COLOR, "FLOAT_COLOR", 0, "Color", "RGBA color 32-bit floating-point values"}, + {CD_PROP_BYTE_COLOR, + "BYTE_COLOR", + 0, + "Byte Color", + "RGBA color with 8-bit positive integer values"}, {CD_PROP_STRING, "STRING", 0, "String", "Text string"}, {CD_PROP_BOOL, "BOOLEAN", 0, "Boolean", "True or false"}, {CD_PROP_FLOAT2, "FLOAT2", 0, "2D Vector", "2D vector with floating-point values"}, @@ -143,7 +151,7 @@ static int rna_Attribute_name_editable(PointerRNA *ptr, const char **r_info) { CustomDataLayer *layer = ptr->data; if (BKE_id_attribute_required(ptr->owner_id, layer)) { - *r_info = N_("Can't modify name of required geometry attribute"); + *r_info = N_("Cannot modify name of required geometry attribute"); return false; } @@ -586,7 +594,8 @@ static void rna_def_attribute_float(BlenderRNA *brna) srna = RNA_def_struct(brna, "FloatAttribute", "Attribute"); RNA_def_struct_sdna(srna, "CustomDataLayer"); - RNA_def_struct_ui_text(srna, "Float Attribute", "Geometry attribute with floating-point values"); + RNA_def_struct_ui_text( + srna, "Float Attribute", "Geometry attribute that stores floating-point values"); prop = RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE); RNA_def_property_struct_type(prop, "FloatAttributeValue"); @@ -618,7 +627,7 @@ static void rna_def_attribute_float_vector(BlenderRNA *brna) srna = RNA_def_struct(brna, "FloatVectorAttribute", "Attribute"); RNA_def_struct_sdna(srna, "CustomDataLayer"); RNA_def_struct_ui_text( - srna, "Float Vector Attribute", "Vector geometry attribute, with floating-point values"); + srna, "Float Vector Attribute", "Geometry attribute that stores floating-point 3D vectors"); prop = RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE); RNA_def_property_struct_type(prop, "FloatVectorAttributeValue"); @@ -653,8 +662,10 @@ static void rna_def_attribute_float_color(BlenderRNA *brna) /* Float Color Attribute */ srna = RNA_def_struct(brna, "FloatColorAttribute", "Attribute"); RNA_def_struct_sdna(srna, "CustomDataLayer"); - RNA_def_struct_ui_text( - srna, "Float Color Attribute", "Color geometry attribute, with floating-point values"); + RNA_def_struct_ui_text(srna, + "Float Color Attribute", + "Geometry attribute that stores RGBA colors as floating-point values " + "using 32-bits per channel"); prop = RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE); RNA_def_property_struct_type(prop, "FloatColorAttributeValue"); @@ -688,8 +699,10 @@ static void rna_def_attribute_byte_color(BlenderRNA *brna) /* Byte Color Attribute */ srna = RNA_def_struct(brna, "ByteColorAttribute", "Attribute"); RNA_def_struct_sdna(srna, "CustomDataLayer"); - RNA_def_struct_ui_text( - srna, "Byte Color Attribute", "Color geometry attribute, with 8-bit values"); + RNA_def_struct_ui_text(srna, + "Byte Color Attribute", + "Geometry attribute that stores RGBA colors as positive integer values " + "using 8-bits per channel"); prop = RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE); RNA_def_property_struct_type(prop, "ByteColorAttributeValue"); @@ -726,7 +739,8 @@ static void rna_def_attribute_int(BlenderRNA *brna) srna = RNA_def_struct(brna, "IntAttribute", "Attribute"); RNA_def_struct_sdna(srna, "CustomDataLayer"); - RNA_def_struct_ui_text(srna, "Int Attribute", "Integer geometry attribute"); + RNA_def_struct_ui_text( + srna, "Integer Attribute", "Geometry attribute that stores integer values"); prop = RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE); RNA_def_property_struct_type(prop, "IntAttributeValue"); @@ -755,7 +769,7 @@ static void rna_def_attribute_string(BlenderRNA *brna) srna = RNA_def_struct(brna, "StringAttribute", "Attribute"); RNA_def_struct_sdna(srna, "CustomDataLayer"); - RNA_def_struct_ui_text(srna, "String Attribute", "String geometry attribute"); + RNA_def_struct_ui_text(srna, "String Attribute", "Geometry attribute that stores strings"); prop = RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE); RNA_def_property_struct_type(prop, "StringAttributeValue"); @@ -784,7 +798,7 @@ static void rna_def_attribute_bool(BlenderRNA *brna) srna = RNA_def_struct(brna, "BoolAttribute", "Attribute"); RNA_def_struct_sdna(srna, "CustomDataLayer"); - RNA_def_struct_ui_text(srna, "Bool Attribute", "Bool geometry attribute"); + RNA_def_struct_ui_text(srna, "Bool Attribute", "Geometry attribute that stores booleans"); prop = RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE); RNA_def_property_struct_type(prop, "BoolAttributeValue"); @@ -812,7 +826,8 @@ static void rna_def_attribute_int8(BlenderRNA *brna) srna = RNA_def_struct(brna, "ByteIntAttribute", "Attribute"); RNA_def_struct_sdna(srna, "CustomDataLayer"); - RNA_def_struct_ui_text(srna, "8-bit Int Attribute", "8-bit int geometry attribute"); + RNA_def_struct_ui_text( + srna, "8-bit Integer Attribute", "Geometry attribute that stores 8-bit integers"); prop = RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE); RNA_def_property_struct_type(prop, "ByteIntAttributeValue"); @@ -844,7 +859,7 @@ static void rna_def_attribute_float2(BlenderRNA *brna) srna = RNA_def_struct(brna, "Float2Attribute", "Attribute"); RNA_def_struct_sdna(srna, "CustomDataLayer"); RNA_def_struct_ui_text( - srna, "Float2 Attribute", "2D vector geometry attribute, with floating-point values"); + srna, "Float2 Attribute", "Geometry attribute that stores floating-point 2D vectors"); prop = RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE); RNA_def_property_struct_type(prop, "Float2AttributeValue"); @@ -927,13 +942,15 @@ static void rna_def_attribute_group(BlenderRNA *brna) /* API */ func = RNA_def_function(srna, "new", "rna_AttributeGroup_new"); - RNA_def_function_ui_description(func, "Add an attribute"); + RNA_def_function_ui_description(func, "Add attribute to geometry"); RNA_def_function_flag(func, FUNC_USE_REPORTS); - parm = RNA_def_string(func, "name", "Attribute", 0, "", "Attribute name"); + parm = RNA_def_string(func, "name", "Attribute", 0, "Name", "Name of geometry attribute"); RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); + parm = RNA_def_enum( func, "type", rna_enum_attribute_type_items, CD_PROP_FLOAT, "Type", "Attribute type"); RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); + parm = RNA_def_enum(func, "domain", rna_enum_attribute_domain_items, @@ -941,12 +958,13 @@ static void rna_def_attribute_group(BlenderRNA *brna) "Domain", "Type of element that attribute is stored on"); RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); + parm = RNA_def_pointer(func, "attribute", "Attribute", "", "New geometry attribute"); RNA_def_parameter_flags(parm, 0, PARM_RNAPTR); RNA_def_function_return(func, parm); func = RNA_def_function(srna, "remove", "rna_AttributeGroup_remove"); - RNA_def_function_ui_description(func, "Remove an attribute"); + RNA_def_function_ui_description(func, "Remove attribute from geometry"); RNA_def_function_flag(func, FUNC_USE_REPORTS); parm = RNA_def_pointer(func, "attribute", "Attribute", "", "Geometry Attribute"); RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); @@ -955,13 +973,14 @@ static void rna_def_attribute_group(BlenderRNA *brna) /* Active */ prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "Attribute"); + RNA_def_property_ui_text(prop, "Active Attribute", "Active attribute"); RNA_def_property_pointer_funcs( prop, "rna_AttributeGroup_active_get", "rna_AttributeGroup_active_set", NULL, NULL); RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_UNLINK); - RNA_def_property_ui_text(prop, "Active Attribute", "Active attribute"); RNA_def_property_update(prop, 0, "rna_AttributeGroup_update_active"); prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_NONE); + RNA_def_property_ui_text(prop, "Active Attribute Index", "Active attribute index"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_int_funcs(prop, "rna_AttributeGroup_active_index_get", @@ -971,16 +990,17 @@ static void rna_def_attribute_group(BlenderRNA *brna) prop = RNA_def_property(srna, "active_color", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "Attribute"); + RNA_def_property_ui_text(prop, "Active Color", "Active color attribute for display and editing"); 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_ui_text(prop, "Active Color Index", "Active color attribute index"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_int_funcs(prop, "rna_AttributeGroup_active_color_index_get", @@ -989,6 +1009,9 @@ static void rna_def_attribute_group(BlenderRNA *brna) 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_ui_text(prop, + "Active Render Color Index", + "The index of the color attribute used as a fallback for rendering"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_int_funcs(prop, "rna_AttributeGroup_render_color_index_get", diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index 582d3061576..38d473f04dd 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -2110,7 +2110,7 @@ static void rna_def_mloopuv(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "active_rnd", 0); RNA_def_property_boolean_funcs( prop, "rna_MeshUVLoopLayer_active_render_get", "rna_MeshUVLoopLayer_active_render_set"); - RNA_def_property_ui_text(prop, "Active Render", "Set the map as active for rendering"); + RNA_def_property_ui_text(prop, "Active Render", "Set the UV map as active for rendering"); RNA_def_property_update(prop, 0, "rna_Mesh_update_data_legacy_deg_tag_all"); prop = RNA_def_property(srna, "active_clone", PROP_BOOLEAN, PROP_NONE); @@ -2678,7 +2678,7 @@ static void rna_def_uv_layers(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_property_srna(cprop, "UVLoopLayers"); srna = RNA_def_struct(brna, "UVLoopLayers", NULL); RNA_def_struct_sdna(srna, "Mesh"); - RNA_def_struct_ui_text(srna, "UV Loop Layers", "Collection of uv loop layers"); + RNA_def_struct_ui_text(srna, "UV Map Layers", "Collection of UV map layers"); func = RNA_def_function(srna, "new", "rna_Mesh_uv_layers_new"); RNA_def_function_flag(func, FUNC_USE_REPORTS); @@ -2705,7 +2705,7 @@ static void rna_def_uv_layers(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_property_pointer_funcs( prop, "rna_Mesh_uv_layer_active_get", "rna_Mesh_uv_layer_active_set", NULL, NULL); RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_UNLINK); - RNA_def_property_ui_text(prop, "Active UV Loop Layer", "Active UV loop layer"); + RNA_def_property_ui_text(prop, "Active UV Map Layer", "Active UV Map layer"); RNA_def_property_update(prop, 0, "rna_Mesh_update_data_legacy_deg_tag_all"); prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_UNSIGNED); @@ -2713,7 +2713,7 @@ static void rna_def_uv_layers(BlenderRNA *brna, PropertyRNA *cprop) "rna_Mesh_uv_layer_active_index_get", "rna_Mesh_uv_layer_active_index_set", "rna_Mesh_uv_layer_index_range"); - RNA_def_property_ui_text(prop, "Active UV Loop Layer Index", "Active UV loop layer index"); + RNA_def_property_ui_text(prop, "Active UV Map Index", "Active UV map index"); RNA_def_property_update(prop, 0, "rna_Mesh_update_data_legacy_deg_tag_all"); }