diff options
author | Hans Goudey <h.goudey@me.com> | 2022-05-03 13:23:17 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-05-03 13:23:17 +0300 |
commit | 11d075f07da9c480219d776cea087ba29d867064 (patch) | |
tree | 3727c2d3ceae1218b74b5b9b1583f44e96304586 /source/blender/editors | |
parent | 61e8310b7581e8a128f5610d86ab2566852aa4dc (diff) |
Cleanup: Move color attribute enums to be reusable
These enum property arrays are used by a few patches
in review. Moving them here means they don't have to
be duplicated.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/geometry/geometry_attributes.cc | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/source/blender/editors/geometry/geometry_attributes.cc b/source/blender/editors/geometry/geometry_attributes.cc index 05f9e19da71..cfc158b117f 100644 --- a/source/blender/editors/geometry/geometry_attributes.cc +++ b/source/blender/editors/geometry/geometry_attributes.cc @@ -385,24 +385,16 @@ void GEOMETRY_OT_color_attribute_add(wmOperatorType *ot) 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", ""}, - {ATTR_DOMAIN_CORNER, "CORNER", 0, "Face Corner", ""}, - {0, nullptr, 0, nullptr, nullptr}}; - - static EnumPropertyItem types[3] = {{CD_PROP_COLOR, "COLOR", 0, "Color", ""}, - {CD_PROP_BYTE_COLOR, "BYTE_COLOR", 0, "Byte Color", ""}, - {0, nullptr, 0, nullptr, nullptr}}; - prop = RNA_def_enum(ot->srna, "domain", - domains, + rna_enum_color_attribute_domain_items, ATTR_DOMAIN_POINT, "Domain", "Type of element that attribute is stored on"); prop = RNA_def_enum(ot->srna, "data_type", - types, + rna_enum_color_attribute_type_items, CD_PROP_COLOR, "Data Type", "Type of data stored in attribute"); |