From 44bac4c8ccf19cb5941435115b8f89a9d14e9c23 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 1 Jun 2022 14:38:06 +1000 Subject: Cleanup: use 'e' prefix for enum types - CustomDataType -> eCustomDataType - CustomDataMask -> eCustomDataMask - AttributeDomain -> eAttrDomain - NamedAttributeUsage -> eNamedAttrUsage --- source/blender/editors/curves/intern/curves_ops.cc | 4 +-- .../editors/geometry/geometry_attributes.cc | 21 ++++++------ source/blender/editors/include/ED_geometry.h | 8 ++--- .../interface_template_attribute_search.cc | 4 +-- source/blender/editors/mesh/editmesh_undo.c | 4 +-- .../blender/editors/object/object_data_transfer.c | 4 +-- .../sculpt_paint/curves_sculpt_selection.cc | 14 ++++---- .../editors/sculpt_paint/paint_image_proj.c | 8 ++--- .../blender/editors/sculpt_paint/paint_vertex.cc | 40 +++++++++++----------- source/blender/editors/sculpt_paint/sculpt_undo.c | 4 +-- source/blender/editors/space_node/node_draw.cc | 20 +++++------ .../space_node/node_geometry_attribute_search.cc | 4 +-- .../editors/space_node/node_relationships.cc | 4 +-- .../spreadsheet_data_source_geometry.cc | 6 ++-- .../spreadsheet_data_source_geometry.hh | 4 +-- .../space_spreadsheet/spreadsheet_dataset_draw.cc | 6 ++-- .../editors/space_spreadsheet/spreadsheet_ops.cc | 2 +- 17 files changed, 77 insertions(+), 80 deletions(-) (limited to 'source/blender/editors') diff --git a/source/blender/editors/curves/intern/curves_ops.cc b/source/blender/editors/curves/intern/curves_ops.cc index efa4f884e17..d35e58d5eba 100644 --- a/source/blender/editors/curves/intern/curves_ops.cc +++ b/source/blender/editors/curves/intern/curves_ops.cc @@ -705,14 +705,14 @@ namespace set_selection_domain { static int curves_set_selection_domain_exec(bContext *C, wmOperator *op) { - const AttributeDomain domain = AttributeDomain(RNA_enum_get(op->ptr, "domain")); + const eAttrDomain domain = eAttrDomain(RNA_enum_get(op->ptr, "domain")); for (Curves *curves_id : get_unique_editable_curves(*C)) { if (curves_id->selection_domain == domain && (curves_id->flag & CV_SCULPT_SELECTION_ENABLED)) { continue; } - const AttributeDomain old_domain = AttributeDomain(curves_id->selection_domain); + const eAttrDomain old_domain = eAttrDomain(curves_id->selection_domain); curves_id->selection_domain = domain; curves_id->flag |= CV_SCULPT_SELECTION_ENABLED; diff --git a/source/blender/editors/geometry/geometry_attributes.cc b/source/blender/editors/geometry/geometry_attributes.cc index 814c2639169..c9677da1af5 100644 --- a/source/blender/editors/geometry/geometry_attributes.cc +++ b/source/blender/editors/geometry/geometry_attributes.cc @@ -90,8 +90,8 @@ static int geometry_attribute_add_exec(bContext *C, wmOperator *op) char name[MAX_NAME]; RNA_string_get(op->ptr, "name", name); - CustomDataType type = (CustomDataType)RNA_enum_get(op->ptr, "data_type"); - AttributeDomain domain = (AttributeDomain)RNA_enum_get(op->ptr, "domain"); + eCustomDataType type = (eCustomDataType)RNA_enum_get(op->ptr, "data_type"); + eAttrDomain domain = (eAttrDomain)RNA_enum_get(op->ptr, "domain"); CustomDataLayer *layer = BKE_id_attribute_new(id, name, type, domain, op->reports); if (layer == nullptr) { @@ -219,8 +219,8 @@ static int geometry_color_attribute_add_exec(bContext *C, wmOperator *op) char name[MAX_NAME]; RNA_string_get(op->ptr, "name", name); - CustomDataType type = (CustomDataType)RNA_enum_get(op->ptr, "data_type"); - AttributeDomain domain = (AttributeDomain)RNA_enum_get(op->ptr, "domain"); + eCustomDataType type = (eCustomDataType)RNA_enum_get(op->ptr, "data_type"); + eAttrDomain domain = (eAttrDomain)RNA_enum_get(op->ptr, "domain"); CustomDataLayer *layer = BKE_id_attribute_new(id, name, type, domain, op->reports); float color[4]; @@ -289,9 +289,8 @@ static int geometry_attribute_convert_exec(bContext *C, wmOperator *op) * 4. Create a new attribute based on the previously copied data. */ switch (mode) { case ConvertAttributeMode::Generic: { - const AttributeDomain dst_domain = static_cast( - RNA_enum_get(op->ptr, "domain")); - const CustomDataType dst_type = static_cast( + const eAttrDomain dst_domain = static_cast(RNA_enum_get(op->ptr, "domain")); + const eCustomDataType dst_type = static_cast( RNA_enum_get(op->ptr, "data_type")); if (ELEM(dst_type, CD_PROP_STRING)) { @@ -579,10 +578,10 @@ using blender::GVArray; bool ED_geometry_attribute_convert(Mesh *mesh, const char *layer_name, - CustomDataType old_type, - AttributeDomain old_domain, - CustomDataType new_type, - AttributeDomain new_domain) + eCustomDataType old_type, + eAttrDomain old_domain, + eCustomDataType new_type, + eAttrDomain new_domain) { CustomDataLayer *layer = BKE_id_attribute_find(&mesh->id, layer_name, old_type, old_domain); const std::string name = layer->name; diff --git a/source/blender/editors/include/ED_geometry.h b/source/blender/editors/include/ED_geometry.h index 46e6904523a..4620181894a 100644 --- a/source/blender/editors/include/ED_geometry.h +++ b/source/blender/editors/include/ED_geometry.h @@ -19,10 +19,10 @@ struct Mesh; void ED_operatortypes_geometry(void); bool ED_geometry_attribute_convert(struct Mesh *mesh, const char *layer_name, - CustomDataType old_type, - AttributeDomain old_domain, - CustomDataType new_type, - AttributeDomain new_domain); + eCustomDataType old_type, + eAttrDomain old_domain, + eCustomDataType new_type, + eAttrDomain new_domain); #ifdef __cplusplus } #endif diff --git a/source/blender/editors/interface/interface_template_attribute_search.cc b/source/blender/editors/interface/interface_template_attribute_search.cc index 65764e31ec8..4e587bd5338 100644 --- a/source/blender/editors/interface/interface_template_attribute_search.cc +++ b/source/blender/editors/interface/interface_template_attribute_search.cc @@ -24,14 +24,14 @@ using blender::nodes::geometry_nodes_eval_log::GeometryAttributeInfo; namespace blender::ui { -static StringRef attribute_data_type_string(const CustomDataType type) +static StringRef attribute_data_type_string(const eCustomDataType type) { const char *name = nullptr; RNA_enum_name_from_value(rna_enum_attribute_type_items, type, &name); return StringRef(IFACE_(name)); } -static StringRef attribute_domain_string(const AttributeDomain domain) +static StringRef attribute_domain_string(const eAttrDomain domain) { const char *name = nullptr; RNA_enum_name_from_value(rna_enum_attribute_domain_items, domain, &name); diff --git a/source/blender/editors/mesh/editmesh_undo.c b/source/blender/editors/mesh/editmesh_undo.c index ecc5f8f8ef5..d75c92f963f 100644 --- a/source/blender/editors/mesh/editmesh_undo.c +++ b/source/blender/editors/mesh/editmesh_undo.c @@ -72,7 +72,7 @@ static CLG_LogRef LOG = {"ed.undo.mesh"}; /* Single linked list of layers stored per type */ typedef struct BArrayCustomData { struct BArrayCustomData *next; - CustomDataType type; + eCustomDataType type; int states_len; /* number of layers for each type */ BArrayState *states[0]; } BArrayCustomData; @@ -149,7 +149,7 @@ static void um_arraystore_cd_compact(struct CustomData *cdata, const BArrayCustomData *bcd_reference_current = bcd_reference; BArrayCustomData *bcd = NULL, *bcd_first = NULL, *bcd_prev = NULL; for (int layer_start = 0, layer_end; layer_start < cdata->totlayer; layer_start = layer_end) { - const CustomDataType type = cdata->layers[layer_start].type; + const eCustomDataType type = cdata->layers[layer_start].type; /* Perform a full copy on dynamic layers. * diff --git a/source/blender/editors/object/object_data_transfer.c b/source/blender/editors/object/object_data_transfer.c index b9a4c79ac03..4837b538bf6 100644 --- a/source/blender/editors/object/object_data_transfer.c +++ b/source/blender/editors/object/object_data_transfer.c @@ -88,14 +88,14 @@ static const EnumPropertyItem DT_layer_items[] = { }; static void dt_add_vcol_layers(CustomData *cdata, - CustomDataMask mask, + eCustomDataMask mask, EnumPropertyItem **r_item, int *r_totitem) { int types[2] = {CD_PROP_COLOR, CD_PROP_BYTE_COLOR}; for (int i = 0; i < 2; i++) { - CustomDataType type = types[i]; + eCustomDataType type = types[i]; if (!(mask & CD_TYPE_AS_MASK(type))) { continue; diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_selection.cc b/source/blender/editors/sculpt_paint/curves_sculpt_selection.cc index 9a14f0cfef0..f620fed5761 100644 --- a/source/blender/editors/sculpt_paint/curves_sculpt_selection.cc +++ b/source/blender/editors/sculpt_paint/curves_sculpt_selection.cc @@ -8,8 +8,7 @@ namespace blender::ed::sculpt_paint { -static VArray get_curves_selection(const CurvesGeometry &curves, - const AttributeDomain domain) +static VArray get_curves_selection(const CurvesGeometry &curves, const eAttrDomain domain) { switch (domain) { case ATTR_DOMAIN_CURVE: @@ -29,11 +28,10 @@ VArray get_curves_selection(const Curves &curves_id) return VArray::ForSingle(1.0f, CurvesGeometry::wrap(curves_id.geometry).curves_num()); } return get_curves_selection(CurvesGeometry::wrap(curves_id.geometry), - AttributeDomain(curves_id.selection_domain)); + eAttrDomain(curves_id.selection_domain)); } -static VArray get_point_selection(const CurvesGeometry &curves, - const AttributeDomain domain) +static VArray get_point_selection(const CurvesGeometry &curves, const eAttrDomain domain) { switch (domain) { case ATTR_DOMAIN_CURVE: @@ -53,11 +51,11 @@ VArray get_point_selection(const Curves &curves_id) return VArray::ForSingle(1.0f, CurvesGeometry::wrap(curves_id.geometry).points_num()); } return get_point_selection(CurvesGeometry::wrap(curves_id.geometry), - AttributeDomain(curves_id.selection_domain)); + eAttrDomain(curves_id.selection_domain)); } static IndexMask retrieve_selected_curves(const CurvesGeometry &curves, - const AttributeDomain domain, + const eAttrDomain domain, Vector &r_indices) { switch (domain) { @@ -100,7 +98,7 @@ IndexMask retrieve_selected_curves(const Curves &curves_id, Vector &r_i return CurvesGeometry::wrap(curves_id.geometry).curves_range(); } return retrieve_selected_curves(CurvesGeometry::wrap(curves_id.geometry), - AttributeDomain(curves_id.selection_domain), + eAttrDomain(curves_id.selection_domain), r_indices); } diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index b7ec427349f..e6c90fd8d3f 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -6488,14 +6488,14 @@ static CustomDataLayer *proj_paint_color_attribute_create(wmOperator *op, Object { char name[MAX_NAME] = ""; float color[4] = {0.0f, 0.0f, 0.0f, 1.0f}; - AttributeDomain domain = ATTR_DOMAIN_POINT; - CustomDataType type = CD_PROP_COLOR; + eAttrDomain domain = ATTR_DOMAIN_POINT; + eCustomDataType type = CD_PROP_COLOR; if (op) { RNA_string_get(op->ptr, "name", name); RNA_float_get_array(op->ptr, "color", color); - domain = (AttributeDomain)RNA_enum_get(op->ptr, "domain"); - type = (CustomDataType)RNA_enum_get(op->ptr, "data_type"); + domain = (eAttrDomain)RNA_enum_get(op->ptr, "domain"); + type = (eCustomDataType)RNA_enum_get(op->ptr, "data_type"); } ID *id = (ID *)ob->data; diff --git a/source/blender/editors/sculpt_paint/paint_vertex.cc b/source/blender/editors/sculpt_paint/paint_vertex.cc index fb1c8ceaa1a..fea501f20a9 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.cc +++ b/source/blender/editors/sculpt_paint/paint_vertex.cc @@ -140,7 +140,7 @@ struct NormalAnglePrecalc { static int get_vcol_elements(Mesh *me, size_t *r_elem_size) { CustomDataLayer *layer = BKE_id_attributes_active_color_get(&me->id); - AttributeDomain domain = BKE_id_attribute_domain(&me->id, layer); + eAttrDomain domain = BKE_id_attribute_domain(&me->id, layer); if (r_elem_size) { *r_elem_size = layer->type == CD_PROP_COLOR ? sizeof(float) * 4ULL : 4ULL; @@ -324,7 +324,7 @@ bool weight_paint_poll_ignore_tool(bContext *C) return weight_paint_poll_ex(C, false); } -template +template static Color vpaint_get_current_col(Scene *scene, VPaint *vp, bool secondary) { Brush *brush = BKE_paint_brush(&vp->paint); @@ -2823,11 +2823,11 @@ void PAINT_OT_vertex_paint_toggle(wmOperatorType *ot) struct VPaintDataBase { ViewContext vc; - AttributeDomain domain; - CustomDataType type; + eAttrDomain domain; + eCustomDataType type; }; -template +template struct VPaintData : public VPaintDataBase { NormalAnglePrecalc normal_angle_precalc; @@ -2855,7 +2855,7 @@ struct VPaintData : public VPaintDataBase { } smear; }; -template +template static void *vpaint_init_vpaint(bContext *C, wmOperator *op, Scene *scene, @@ -2949,7 +2949,7 @@ static bool vpaint_stroke_test_start(bContext *C, wmOperator *op, const float mo return false; } - AttributeDomain domain = BKE_id_attribute_domain(&me->id, layer); + eAttrDomain domain = BKE_id_attribute_domain(&me->id, layer); void *vpd = nullptr; if (domain == ATTR_DOMAIN_POINT) { @@ -3272,7 +3272,7 @@ static void do_vpaint_brush_blur_verts(bContext *C, }); } -template +template static void do_vpaint_brush_smear(bContext *C, Sculpt *UNUSED(sd), VPaint *vp, @@ -3451,7 +3451,7 @@ static void do_vpaint_brush_smear(bContext *C, }); } -template +template static void calculate_average_color(VPaintData *vpd, Object *ob, Mesh *me, @@ -3541,7 +3541,7 @@ static void calculate_average_color(VPaintData *vpd, } } -template +template static float paint_and_tex_color_alpha(VPaint *vp, VPaintData *vpd, const float v_co[3], @@ -3559,7 +3559,7 @@ static float paint_and_tex_color_alpha(VPaint *vp, return rgba[3]; } -template +template static void vpaint_do_draw(bContext *C, Sculpt *UNUSED(sd), VPaint *vp, @@ -3699,7 +3699,7 @@ static void vpaint_do_draw(bContext *C, }); } -template +template static void vpaint_do_blur(bContext *C, Sculpt *sd, VPaint *vp, @@ -3718,7 +3718,7 @@ static void vpaint_do_blur(bContext *C, } } -template +template static void vpaint_paint_leaves(bContext *C, Sculpt *sd, VPaint *vp, @@ -3754,7 +3754,7 @@ static void vpaint_paint_leaves(bContext *C, } } -template +template static void vpaint_do_paint(bContext *C, Sculpt *sd, VPaint *vp, @@ -3785,7 +3785,7 @@ static void vpaint_do_paint(bContext *C, } } -template +template static void vpaint_do_radial_symmetry(bContext *C, Sculpt *sd, VPaint *vp, @@ -3804,7 +3804,7 @@ static void vpaint_do_radial_symmetry(bContext *C, /* near duplicate of: sculpt.c's, * 'do_symmetrical_brush_actions' and 'wpaint_do_symmetrical_brush_actions'. */ -template +template static void vpaint_do_symmetrical_brush_actions( bContext *C, Sculpt *sd, VPaint *vp, VPaintData *vpd, Object *ob) { @@ -3851,7 +3851,7 @@ static void vpaint_do_symmetrical_brush_actions( cache->is_last_valid = true; } -template +template static void vpaint_stroke_update_step_intern(bContext *C, PaintStroke *stroke, PointerRNA *itemptr) { Scene *scene = CTX_data_scene(C); @@ -3939,7 +3939,7 @@ static void vpaint_stroke_update_step(bContext *C, } } -template +template static void vpaint_free_vpaintdata(Object *UNUSED(ob), void *_vpd) { VPaintData *vpd = static_cast *>(_vpd); @@ -4096,7 +4096,7 @@ void PAINT_OT_vertex_paint(wmOperatorType *ot) /** \name Set Vertex Colors Operator * \{ */ -template +template static bool vertex_color_set(Object *ob, ColorPaint4f paintcol_in, Color *color_layer) { Mesh *me; @@ -4164,7 +4164,7 @@ static bool paint_object_attributes_active_color_fill_ex(Object *ob, me->editflag &= ~ME_EDIT_PAINT_FACE_SEL; me->editflag &= ~ME_EDIT_PAINT_VERT_SEL; } - AttributeDomain domain = BKE_id_attribute_domain(&me->id, layer); + eAttrDomain domain = BKE_id_attribute_domain(&me->id, layer); bool ok = false; if (domain == ATTR_DOMAIN_POINT) { if (layer->type == CD_PROP_COLOR) { diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c index 4588930bdee..f6b24bede61 100644 --- a/source/blender/editors/sculpt_paint/sculpt_undo.c +++ b/source/blender/editors/sculpt_paint/sculpt_undo.c @@ -106,7 +106,7 @@ typedef struct UndoSculpt { } UndoSculpt; typedef struct SculptAttrRef { - AttributeDomain domain; + eAttrDomain domain; int type; char name[MAX_CUSTOMDATA_LAYER_NAME]; bool was_set; @@ -1576,7 +1576,7 @@ static void sculpt_undo_set_active_layer(struct bContext *C, SculptAttrRef *attr */ if (!layer) { layer = BKE_id_attribute_search(&me->id, attr->name, CD_MASK_PROP_ALL, ATTR_DOMAIN_MASK_ALL); - AttributeDomain domain = layer ? BKE_id_attribute_domain(&me->id, layer) : ATTR_DOMAIN_NUM; + eAttrDomain domain = layer ? BKE_id_attribute_domain(&me->id, layer) : ATTR_DOMAIN_NUM; if (layer && ED_geometry_attribute_convert( me, attr->name, layer->type, domain, attr->type, attr->domain)) { diff --git a/source/blender/editors/space_node/node_draw.cc b/source/blender/editors/space_node/node_draw.cc index e0ff4212a94..7b8413b656a 100644 --- a/source/blender/editors/space_node/node_draw.cc +++ b/source/blender/editors/space_node/node_draw.cc @@ -75,7 +75,7 @@ using blender::GPointer; using blender::fn::GField; namespace geo_log = blender::nodes::geometry_nodes_eval_log; -using geo_log::NamedAttributeUsage; +using geo_log::eNamedAttrUsage; extern "C" { /* XXX interface.h */ @@ -1695,7 +1695,7 @@ struct NodeExtraInfoRow { }; struct NamedAttributeTooltipArg { - Map usage_by_attribute; + Map usage_by_attribute; }; static char *named_attribute_tooltip(bContext *UNUSED(C), void *argN, const char *UNUSED(tip)) @@ -1707,7 +1707,7 @@ static char *named_attribute_tooltip(bContext *UNUSED(C), void *argN, const char struct NameWithUsage { StringRefNull name; - NamedAttributeUsage usage; + eNamedAttrUsage usage; }; Vector sorted_used_attribute; @@ -1722,16 +1722,16 @@ static char *named_attribute_tooltip(bContext *UNUSED(C), void *argN, const char for (const NameWithUsage &attribute : sorted_used_attribute) { const StringRefNull name = attribute.name; - const NamedAttributeUsage usage = attribute.usage; + const eNamedAttrUsage usage = attribute.usage; ss << " \u2022 \"" << name << "\": "; Vector usages; - if ((usage & NamedAttributeUsage::Read) != NamedAttributeUsage::None) { + if ((usage & eNamedAttrUsage::Read) != eNamedAttrUsage::None) { usages.append(TIP_("read")); } - if ((usage & NamedAttributeUsage::Write) != NamedAttributeUsage::None) { + if ((usage & eNamedAttrUsage::Write) != eNamedAttrUsage::None) { usages.append(TIP_("write")); } - if ((usage & NamedAttributeUsage::Remove) != NamedAttributeUsage::None) { + if ((usage & eNamedAttrUsage::Remove) != eNamedAttrUsage::None) { usages.append(TIP_("remove")); } for (const int i : usages.index_range()) { @@ -1749,7 +1749,7 @@ static char *named_attribute_tooltip(bContext *UNUSED(C), void *argN, const char } static NodeExtraInfoRow row_from_used_named_attribute( - const Map &usage_by_attribute_name) + const Map &usage_by_attribute_name) { const int attributes_num = usage_by_attribute_name.size(); @@ -1777,7 +1777,7 @@ static std::optional node_get_accessed_attributes_row(const Sp return std::nullopt; } - Map usage_by_attribute; + Map usage_by_attribute; tree_log->foreach_node_log([&](const geo_log::NodeLog &node_log) { for (const geo_log::UsedNamedAttribute &used_attribute : node_log.used_named_attributes()) { usage_by_attribute.lookup_or_add_as(used_attribute.name, @@ -1807,7 +1807,7 @@ static std::optional node_get_accessed_attributes_row(const Sp if (node_log == nullptr) { return std::nullopt; } - Map usage_by_attribute; + Map usage_by_attribute; for (const geo_log::UsedNamedAttribute &used_attribute : node_log->used_named_attributes()) { usage_by_attribute.lookup_or_add_as(used_attribute.name, used_attribute.usage) |= used_attribute.usage; diff --git a/source/blender/editors/space_node/node_geometry_attribute_search.cc b/source/blender/editors/space_node/node_geometry_attribute_search.cc index ed981603293..f08e23c8371 100644 --- a/source/blender/editors/space_node/node_geometry_attribute_search.cc +++ b/source/blender/editors/space_node/node_geometry_attribute_search.cc @@ -128,7 +128,7 @@ static void attribute_search_update_fn( * Some custom data types don't correspond to node types and therefore can't be * used by the named attribute input node. Find the best option or fallback to float. */ -static CustomDataType data_type_in_attribute_input_node(const CustomDataType type) +static eCustomDataType data_type_in_attribute_input_node(const eCustomDataType type) { switch (type) { case CD_PROP_FLOAT: @@ -187,7 +187,7 @@ static void attribute_search_exec_fn(bContext *C, void *data_v, void *item_v) /* For the attribute input node, also adjust the type and links connected to the output. */ if (node->type == GEO_NODE_INPUT_NAMED_ATTRIBUTE && item->data_type.has_value()) { NodeGeometryInputNamedAttribute &storage = *(NodeGeometryInputNamedAttribute *)node->storage; - const CustomDataType new_type = data_type_in_attribute_input_node(*item->data_type); + const eCustomDataType new_type = data_type_in_attribute_input_node(*item->data_type); if (new_type != storage.data_type) { storage.data_type = new_type; /* Make the output socket with the new type on the attribute input node active. */ diff --git a/source/blender/editors/space_node/node_relationships.cc b/source/blender/editors/space_node/node_relationships.cc index 5796a712205..e10bedb18f4 100644 --- a/source/blender/editors/space_node/node_relationships.cc +++ b/source/blender/editors/space_node/node_relationships.cc @@ -454,7 +454,7 @@ static bool socket_can_be_viewed(const OutputSocketRef &socket) SOCK_RGBA); } -static CustomDataType socket_type_to_custom_data_type(const eNodeSocketDatatype socket_type) +static eCustomDataType socket_type_to_custom_data_type(const eNodeSocketDatatype socket_type) { switch (socket_type) { case SOCK_FLOAT: @@ -491,7 +491,7 @@ static bNodeSocket *node_link_viewer_get_socket(bNodeTree &ntree, return viewer_socket; } NodeGeometryViewer *storage = (NodeGeometryViewer *)viewer_node.storage; - const CustomDataType data_type = socket_type_to_custom_data_type( + const eCustomDataType data_type = socket_type_to_custom_data_type( (eNodeSocketDatatype)src_socket.type); BLI_assert(data_type != CD_AUTO_FROM_NAME); storage->data_type = data_type; diff --git a/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc b/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc index ac15b77fde0..f5315b616d0 100644 --- a/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc +++ b/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.cc @@ -512,7 +512,7 @@ class GeometryComponentCacheValue : public SpreadsheetCache::Value { public: /* Stores the result of fields evaluated on a geometry component. Without this, fields would have * to be reevaluated on every redraw. */ - Map, GArray<>> arrays; + Map, GArray<>> arrays; }; static void add_fields_as_extra_columns(SpaceSpreadsheet *sspreadsheet, @@ -526,7 +526,7 @@ static void add_fields_as_extra_columns(SpaceSpreadsheet *sspreadsheet, sspreadsheet->runtime->cache.lookup_or_add( std::make_unique(component)); - const AttributeDomain domain = (AttributeDomain)sspreadsheet->attribute_domain; + const eAttrDomain domain = (eAttrDomain)sspreadsheet->attribute_domain; const int domain_num = component.attribute_domain_num(domain); for (const auto item : fields_to_show.items()) { StringRef name = item.key; @@ -550,7 +550,7 @@ static void add_fields_as_extra_columns(SpaceSpreadsheet *sspreadsheet, std::unique_ptr data_source_from_geometry(const bContext *C, Object *object_eval) { SpaceSpreadsheet *sspreadsheet = CTX_wm_space_spreadsheet(C); - const AttributeDomain domain = (AttributeDomain)sspreadsheet->attribute_domain; + const eAttrDomain domain = (eAttrDomain)sspreadsheet->attribute_domain; const GeometryComponentType component_type = get_display_component_type(C, object_eval); GeometrySet geometry_set = spreadsheet_get_display_geometry_set(sspreadsheet, object_eval); diff --git a/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.hh b/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.hh index 8b281e5a558..04b4f6d8d06 100644 --- a/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.hh +++ b/source/blender/editors/space_spreadsheet/spreadsheet_data_source_geometry.hh @@ -40,7 +40,7 @@ class GeometryDataSource : public DataSource { Object *object_eval_; const GeometrySet geometry_set_; const GeometryComponent *component_; - AttributeDomain domain_; + eAttrDomain domain_; ExtraColumns extra_columns_; /* Some data is computed on the fly only when it is requested. Computing it does not change the @@ -53,7 +53,7 @@ class GeometryDataSource : public DataSource { GeometryDataSource(Object *object_eval, GeometrySet geometry_set, const GeometryComponentType component_type, - const AttributeDomain domain, + const eAttrDomain domain, ExtraColumns extra_columns) : object_eval_(object_eval), geometry_set_(std::move(geometry_set)), diff --git a/source/blender/editors/space_spreadsheet/spreadsheet_dataset_draw.cc b/source/blender/editors/space_spreadsheet/spreadsheet_dataset_draw.cc index 724d0783707..ee22f4173ab 100644 --- a/source/blender/editors/space_spreadsheet/spreadsheet_dataset_draw.cc +++ b/source/blender/editors/space_spreadsheet/spreadsheet_dataset_draw.cc @@ -27,7 +27,7 @@ class GeometryDataSetTreeView; class GeometryDataSetTreeViewItem : public ui::AbstractTreeViewItem { GeometryComponentType component_type_; - std::optional domain_; + std::optional domain_; BIFIconID icon_; public: @@ -35,7 +35,7 @@ class GeometryDataSetTreeViewItem : public ui::AbstractTreeViewItem { StringRef label, BIFIconID icon); GeometryDataSetTreeViewItem(GeometryComponentType component_type, - AttributeDomain domain, + eAttrDomain domain, StringRef label, BIFIconID icon); @@ -113,7 +113,7 @@ GeometryDataSetTreeViewItem::GeometryDataSetTreeViewItem(GeometryComponentType c this->set_collapsed(false); } GeometryDataSetTreeViewItem::GeometryDataSetTreeViewItem(GeometryComponentType component_type, - AttributeDomain domain, + eAttrDomain domain, StringRef label, BIFIconID icon) : component_type_(component_type), domain_(domain), icon_(icon) diff --git a/source/blender/editors/space_spreadsheet/spreadsheet_ops.cc b/source/blender/editors/space_spreadsheet/spreadsheet_ops.cc index d76bbbf3be6..166c5de9fc3 100644 --- a/source/blender/editors/space_spreadsheet/spreadsheet_ops.cc +++ b/source/blender/editors/space_spreadsheet/spreadsheet_ops.cc @@ -84,7 +84,7 @@ static int select_component_domain_invoke(bContext *C, { GeometryComponentType component_type = static_cast( RNA_int_get(op->ptr, "component_type")); - AttributeDomain attribute_domain = static_cast( + eAttrDomain attribute_domain = static_cast( RNA_int_get(op->ptr, "attribute_domain_type")); SpaceSpreadsheet *sspreadsheet = CTX_wm_space_spreadsheet(C); -- cgit v1.2.3