Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-06-01 07:38:06 +0300
committerCampbell Barton <campbell@blender.org>2022-06-01 08:38:48 +0300
commit44bac4c8ccf19cb5941435115b8f89a9d14e9c23 (patch)
tree2bd7698ca3e1e382b078e274566dbad0ae82214c /source/blender/nodes
parentca346d2176737b6aa296617452a8a6cacb7a970a (diff)
Cleanup: use 'e' prefix for enum types
- CustomDataType -> eCustomDataType - CustomDataMask -> eCustomDataMask - AttributeDomain -> eAttrDomain - NamedAttributeUsage -> eNamedAttrUsage
Diffstat (limited to 'source/blender/nodes')
-rw-r--r--source/blender/nodes/NOD_geometry_exec.hh24
-rw-r--r--source/blender/nodes/NOD_geometry_nodes_eval_log.hh12
-rw-r--r--source/blender/nodes/function/nodes/node_fn_random_value.cc8
-rw-r--r--source/blender/nodes/geometry/node_geometry_util.cc4
-rw-r--r--source/blender/nodes/geometry/node_geometry_util.hh6
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_accumulate_field.cc22
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_attribute_capture.cc14
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_attribute_statistic.cc10
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_curve_endpoint_selection.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_curve_handle_type_selection.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_curve_spline_parameter.cc12
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_delete_geometry.cc26
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_distribute_points_on_faces.cc6
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_dual_mesh.cc4
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc24
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_extrude_mesh.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_field_at_index.cc14
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_input_curve_handles.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_input_mesh_edge_angle.cc4
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_input_mesh_edge_neighbors.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_input_mesh_edge_vertices.cc8
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_area.cc4
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_is_planar.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_neighbors.cc8
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_input_mesh_island.cc4
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_input_mesh_vertex_neighbors.cc8
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_input_named_attribute.cc8
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_input_spline_length.cc4
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_input_tangent.cc4
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_instance_on_points.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc4
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_material_selection.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_mesh_to_points.cc4
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_points_to_vertices.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_raycast.cc10
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_remove_attribute.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_scale_elements.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_separate_geometry.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_set_id.cc6
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_set_position.cc7
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_store_named_attribute.cc14
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_transfer_attribute.cc24
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_viewer.cc6
-rw-r--r--source/blender/nodes/intern/geometry_nodes_eval_log.cc2
-rw-r--r--source/blender/nodes/intern/node_geometry_exec.cc16
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_map_range.cc10
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_uvmap.cc2
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_vertex_color.cc2
49 files changed, 185 insertions, 186 deletions
diff --git a/source/blender/nodes/NOD_geometry_exec.hh b/source/blender/nodes/NOD_geometry_exec.hh
index bac4d0165e9..176a240791e 100644
--- a/source/blender/nodes/NOD_geometry_exec.hh
+++ b/source/blender/nodes/NOD_geometry_exec.hh
@@ -40,7 +40,7 @@ using fn::FieldInput;
using fn::FieldOperation;
using fn::GField;
using fn::ValueOrField;
-using geometry_nodes_eval_log::NamedAttributeUsage;
+using geometry_nodes_eval_log::eNamedAttrUsage;
using geometry_nodes_eval_log::NodeWarningType;
/**
@@ -307,17 +307,17 @@ class GeoNodeExecParams {
*/
GVArray get_input_attribute(const StringRef name,
const GeometryComponent &component,
- AttributeDomain domain,
- const CustomDataType type,
+ eAttrDomain domain,
+ const eCustomDataType type,
const void *default_value) const;
template<typename T>
VArray<T> get_input_attribute(const StringRef name,
const GeometryComponent &component,
- const AttributeDomain domain,
+ const eAttrDomain domain,
const T &default_value) const
{
- const CustomDataType type = bke::cpp_type_to_custom_data_type(CPPType::get<T>());
+ const eCustomDataType type = bke::cpp_type_to_custom_data_type(CPPType::get<T>());
GVArray varray = this->get_input_attribute(name, component, domain, type, &default_value);
return varray.typed<T>();
}
@@ -326,24 +326,24 @@ class GeoNodeExecParams {
* Get the type of an input property or the associated constant socket types with the
* same names. Fall back to the default value if no attribute exists with the name.
*/
- CustomDataType get_input_attribute_data_type(const StringRef name,
- const GeometryComponent &component,
- const CustomDataType default_type) const;
+ eCustomDataType get_input_attribute_data_type(const StringRef name,
+ const GeometryComponent &component,
+ const eCustomDataType default_type) const;
/**
* If any of the corresponding input sockets are attributes instead of single values,
* use the highest priority attribute domain from among them.
* Otherwise return the default domain.
*/
- AttributeDomain get_highest_priority_input_domain(Span<std::string> names,
- const GeometryComponent &component,
- AttributeDomain default_domain) const;
+ eAttrDomain get_highest_priority_input_domain(Span<std::string> names,
+ const GeometryComponent &component,
+ eAttrDomain default_domain) const;
std::string attribute_producer_name() const;
void set_default_remaining_outputs();
- void used_named_attribute(std::string attribute_name, NamedAttributeUsage usage);
+ void used_named_attribute(std::string attribute_name, eNamedAttrUsage usage);
private:
/* Utilities for detecting common errors at when using this class. */
diff --git a/source/blender/nodes/NOD_geometry_nodes_eval_log.hh b/source/blender/nodes/NOD_geometry_nodes_eval_log.hh
index 2917861f084..05c97c3903d 100644
--- a/source/blender/nodes/NOD_geometry_nodes_eval_log.hh
+++ b/source/blender/nodes/NOD_geometry_nodes_eval_log.hh
@@ -90,8 +90,8 @@ class GFieldValueLog : public ValueLog {
struct GeometryAttributeInfo {
std::string name;
/** Can be empty when #name does not actually exist on a geometry yet. */
- std::optional<AttributeDomain> domain;
- std::optional<CustomDataType> data_type;
+ std::optional<eAttrDomain> domain;
+ std::optional<eCustomDataType> data_type;
};
/** Contains information about a geometry set. In most cases this does not store the entire
@@ -171,17 +171,17 @@ struct ValueOfSockets {
destruct_ptr<ValueLog> value;
};
-enum class NamedAttributeUsage {
+enum class eNamedAttrUsage {
None = 0,
Read = 1 << 0,
Write = 1 << 1,
Remove = 1 << 2,
};
-ENUM_OPERATORS(NamedAttributeUsage, NamedAttributeUsage::Remove);
+ENUM_OPERATORS(eNamedAttrUsage, eNamedAttrUsage::Remove);
struct UsedNamedAttribute {
std::string name;
- NamedAttributeUsage usage;
+ eNamedAttrUsage usage;
};
struct NodeWithUsedNamedAttribute {
@@ -219,7 +219,7 @@ class LocalGeoLogger {
void log_multi_value_socket(DSocket socket, Span<GPointer> values);
void log_node_warning(DNode node, NodeWarningType type, std::string message);
void log_execution_time(DNode node, std::chrono::microseconds exec_time);
- void log_used_named_attribute(DNode node, std::string attribute_name, NamedAttributeUsage usage);
+ void log_used_named_attribute(DNode node, std::string attribute_name, eNamedAttrUsage usage);
/**
* Log a message that will be displayed in the node editor next to the node.
* This should only be used for debugging purposes and not to display information to users.
diff --git a/source/blender/nodes/function/nodes/node_fn_random_value.cc b/source/blender/nodes/function/nodes/node_fn_random_value.cc
index a0942ced1be..360695299cb 100644
--- a/source/blender/nodes/function/nodes/node_fn_random_value.cc
+++ b/source/blender/nodes/function/nodes/node_fn_random_value.cc
@@ -57,7 +57,7 @@ static void fn_node_random_value_init(bNodeTree *UNUSED(tree), bNode *node)
static void fn_node_random_value_update(bNodeTree *ntree, bNode *node)
{
const NodeRandomValue &storage = node_storage(*node);
- const CustomDataType data_type = static_cast<CustomDataType>(storage.data_type);
+ const eCustomDataType data_type = static_cast<eCustomDataType>(storage.data_type);
bNodeSocket *sock_min_vector = (bNodeSocket *)node->inputs.first;
bNodeSocket *sock_max_vector = sock_min_vector->next;
@@ -86,7 +86,7 @@ static void fn_node_random_value_update(bNodeTree *ntree, bNode *node)
nodeSetSocketAvailability(ntree, sock_out_bool, data_type == CD_PROP_BOOL);
}
-static std::optional<CustomDataType> node_type_from_other_socket(const bNodeSocket &socket)
+static std::optional<eCustomDataType> node_type_from_other_socket(const bNodeSocket &socket)
{
switch (socket.type) {
case SOCK_FLOAT:
@@ -106,7 +106,7 @@ static std::optional<CustomDataType> node_type_from_other_socket(const bNodeSock
static void fn_node_random_value_gather_link_search(GatherLinkSearchOpParams &params)
{
const NodeDeclaration &declaration = *params.node_type().fixed_declaration;
- const std::optional<CustomDataType> type = node_type_from_other_socket(params.other_socket());
+ const std::optional<eCustomDataType> type = node_type_from_other_socket(params.other_socket());
if (!type) {
return;
}
@@ -137,7 +137,7 @@ static void fn_node_random_value_gather_link_search(GatherLinkSearchOpParams &pa
static void fn_node_random_value_build_multi_function(NodeMultiFunctionBuilder &builder)
{
const NodeRandomValue &storage = node_storage(builder.node());
- const CustomDataType data_type = static_cast<CustomDataType>(storage.data_type);
+ const eCustomDataType data_type = static_cast<eCustomDataType>(storage.data_type);
switch (data_type) {
case CD_PROP_FLOAT3: {
diff --git a/source/blender/nodes/geometry/node_geometry_util.cc b/source/blender/nodes/geometry/node_geometry_util.cc
index 7f9ec329efd..8f673d2264e 100644
--- a/source/blender/nodes/geometry/node_geometry_util.cc
+++ b/source/blender/nodes/geometry/node_geometry_util.cc
@@ -14,7 +14,7 @@
namespace blender::nodes {
-std::optional<CustomDataType> node_data_type_to_custom_data_type(const eNodeSocketDatatype type)
+std::optional<eCustomDataType> node_data_type_to_custom_data_type(const eNodeSocketDatatype type)
{
switch (type) {
case SOCK_FLOAT:
@@ -34,7 +34,7 @@ std::optional<CustomDataType> node_data_type_to_custom_data_type(const eNodeSock
}
}
-std::optional<CustomDataType> node_socket_to_custom_data_type(const bNodeSocket &socket)
+std::optional<eCustomDataType> node_socket_to_custom_data_type(const bNodeSocket &socket)
{
return node_data_type_to_custom_data_type(static_cast<eNodeSocketDatatype>(socket.type));
}
diff --git a/source/blender/nodes/geometry/node_geometry_util.hh b/source/blender/nodes/geometry/node_geometry_util.hh
index 8f20da66c3b..d261928d1b8 100644
--- a/source/blender/nodes/geometry/node_geometry_util.hh
+++ b/source/blender/nodes/geometry/node_geometry_util.hh
@@ -70,13 +70,13 @@ void copy_point_attributes_based_on_mask(const GeometryComponent &in_component,
* component. If no component can work with the domain, then `error_message` is set to true.
*/
void separate_geometry(GeometrySet &geometry_set,
- AttributeDomain domain,
+ eAttrDomain domain,
GeometryNodeDeleteGeometryMode mode,
const Field<bool> &selection_field,
bool invert,
bool &r_is_error);
-std::optional<CustomDataType> node_data_type_to_custom_data_type(eNodeSocketDatatype type);
-std::optional<CustomDataType> node_socket_to_custom_data_type(const bNodeSocket &socket);
+std::optional<eCustomDataType> node_data_type_to_custom_data_type(eNodeSocketDatatype type);
+std::optional<eCustomDataType> node_socket_to_custom_data_type(const bNodeSocket &socket);
} // namespace blender::nodes
diff --git a/source/blender/nodes/geometry/nodes/node_geo_accumulate_field.cc b/source/blender/nodes/geometry/nodes/node_geo_accumulate_field.cc
index b29831ceeb6..a7404af8564 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_accumulate_field.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_accumulate_field.cc
@@ -87,7 +87,7 @@ static void node_init(bNodeTree *UNUSED(tree), bNode *node)
static void node_update(bNodeTree *ntree, bNode *node)
{
const NodeAccumulateField &storage = node_storage(*node);
- const CustomDataType data_type = static_cast<CustomDataType>(storage.data_type);
+ const eCustomDataType data_type = static_cast<eCustomDataType>(storage.data_type);
bNodeSocket *sock_in_vector = (bNodeSocket *)node->inputs.first;
bNodeSocket *sock_in_float = sock_in_vector->next;
@@ -123,7 +123,7 @@ static void node_update(bNodeTree *ntree, bNode *node)
enum class AccumulationMode { Leading = 0, Trailing = 1 };
-static std::optional<CustomDataType> node_type_from_other_socket(const bNodeSocket &socket)
+static std::optional<eCustomDataType> node_type_from_other_socket(const bNodeSocket &socket)
{
switch (socket.type) {
case SOCK_FLOAT:
@@ -141,7 +141,7 @@ static std::optional<CustomDataType> node_type_from_other_socket(const bNodeSock
static void node_gather_link_searches(GatherLinkSearchOpParams &params)
{
- const std::optional<CustomDataType> type = node_type_from_other_socket(params.other_socket());
+ const std::optional<eCustomDataType> type = node_type_from_other_socket(params.other_socket());
if (!type) {
return;
}
@@ -196,11 +196,11 @@ template<typename T> class AccumulateFieldInput final : public GeometryFieldInpu
private:
Field<T> input_;
Field<int> group_index_;
- AttributeDomain source_domain_;
+ eAttrDomain source_domain_;
AccumulationMode accumulation_mode_;
public:
- AccumulateFieldInput(const AttributeDomain source_domain,
+ AccumulateFieldInput(const eAttrDomain source_domain,
Field<T> input,
Field<int> group_index,
AccumulationMode accumulation_mode)
@@ -213,7 +213,7 @@ template<typename T> class AccumulateFieldInput final : public GeometryFieldInpu
}
GVArray get_varray_for_context(const GeometryComponent &component,
- const AttributeDomain domain,
+ const eAttrDomain domain,
IndexMask UNUSED(mask)) const final
{
const GeometryComponentFieldContext field_context{component, source_domain_};
@@ -287,10 +287,10 @@ template<typename T> class TotalFieldInput final : public GeometryFieldInput {
private:
Field<T> input_;
Field<int> group_index_;
- AttributeDomain source_domain_;
+ eAttrDomain source_domain_;
public:
- TotalFieldInput(const AttributeDomain source_domain, Field<T> input, Field<int> group_index)
+ TotalFieldInput(const eAttrDomain source_domain, Field<T> input, Field<int> group_index)
: GeometryFieldInput(CPPType::get<T>(), "Total Value"),
input_(input),
group_index_(group_index),
@@ -299,7 +299,7 @@ template<typename T> class TotalFieldInput final : public GeometryFieldInput {
}
GVArray get_varray_for_context(const GeometryComponent &component,
- const AttributeDomain domain,
+ const eAttrDomain domain,
IndexMask UNUSED(mask)) const final
{
const GeometryComponentFieldContext field_context{component, source_domain_};
@@ -365,8 +365,8 @@ template<typename T> std::string identifier_suffix()
static void node_geo_exec(GeoNodeExecParams params)
{
const NodeAccumulateField &storage = node_storage(params.node());
- const CustomDataType data_type = static_cast<CustomDataType>(storage.data_type);
- const AttributeDomain source_domain = static_cast<AttributeDomain>(storage.domain);
+ const eCustomDataType data_type = static_cast<eCustomDataType>(storage.data_type);
+ const eAttrDomain source_domain = static_cast<eAttrDomain>(storage.domain);
Field<int> group_index_field = params.extract_input<Field<int>>("Group Index");
attribute_math::convert_to_static_type(data_type, [&](auto dummy) {
diff --git a/source/blender/nodes/geometry/nodes/node_geo_attribute_capture.cc b/source/blender/nodes/geometry/nodes/node_geo_attribute_capture.cc
index 16967d32673..496fb081d6b 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_attribute_capture.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_attribute_capture.cc
@@ -50,7 +50,7 @@ static void node_init(bNodeTree *UNUSED(tree), bNode *node)
static void node_update(bNodeTree *ntree, bNode *node)
{
const NodeGeometryAttributeCapture &storage = node_storage(*node);
- const CustomDataType data_type = static_cast<CustomDataType>(storage.data_type);
+ const eCustomDataType data_type = static_cast<eCustomDataType>(storage.data_type);
bNodeSocket *socket_value_geometry = (bNodeSocket *)node->inputs.first;
bNodeSocket *socket_value_vector = socket_value_geometry->next;
@@ -86,7 +86,7 @@ static void node_gather_link_searches(GatherLinkSearchOpParams &params)
search_link_ops_for_declarations(params, declaration.outputs().take_front(1));
const bNodeType &node_type = params.node_type();
- const std::optional<CustomDataType> type = node_data_type_to_custom_data_type(
+ const std::optional<eCustomDataType> type = node_data_type_to_custom_data_type(
(eNodeSocketDatatype)params.other_socket().type);
if (type && *type != CD_PROP_STRING) {
if (params.in_out() == SOCK_OUT) {
@@ -108,14 +108,14 @@ static void node_gather_link_searches(GatherLinkSearchOpParams &params)
static void try_capture_field_on_geometry(GeometryComponent &component,
const AttributeIDRef &attribute_id,
- const AttributeDomain domain,
+ const eAttrDomain domain,
const GField &field)
{
GeometryComponentFieldContext field_context{component, domain};
const int domain_num = component.attribute_domain_num(domain);
const IndexMask mask{IndexMask(domain_num)};
- const CustomDataType data_type = bke::cpp_type_to_custom_data_type(field.cpp_type());
+ const eCustomDataType data_type = bke::cpp_type_to_custom_data_type(field.cpp_type());
OutputAttribute output_attribute = component.attribute_try_get_for_output_only(
attribute_id, domain, data_type);
@@ -126,7 +126,7 @@ static void try_capture_field_on_geometry(GeometryComponent &component,
output_attribute.save();
}
-static StringRefNull identifier_suffix(CustomDataType data_type)
+static StringRefNull identifier_suffix(eCustomDataType data_type)
{
switch (data_type) {
case CD_PROP_FLOAT:
@@ -158,8 +158,8 @@ static void node_geo_exec(GeoNodeExecParams params)
}
const NodeGeometryAttributeCapture &storage = node_storage(params.node());
- const CustomDataType data_type = static_cast<CustomDataType>(storage.data_type);
- const AttributeDomain domain = static_cast<AttributeDomain>(storage.domain);
+ const eCustomDataType data_type = static_cast<eCustomDataType>(storage.data_type);
+ const eAttrDomain domain = static_cast<eAttrDomain>(storage.domain);
const std::string output_identifier = "Attribute" + identifier_suffix(data_type);
diff --git a/source/blender/nodes/geometry/nodes/node_geo_attribute_statistic.cc b/source/blender/nodes/geometry/nodes/node_geo_attribute_statistic.cc
index c7f65a68d60..35404725998 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_attribute_statistic.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_attribute_statistic.cc
@@ -77,7 +77,7 @@ static void node_update(bNodeTree *ntree, bNode *node)
bNodeSocket *socket_vector_std = socket_vector_range->next;
bNodeSocket *socket_vector_variance = socket_vector_std->next;
- const CustomDataType data_type = static_cast<CustomDataType>(node->custom1);
+ const eCustomDataType data_type = static_cast<eCustomDataType>(node->custom1);
nodeSetSocketAvailability(ntree, socket_float_attr, data_type == CD_PROP_FLOAT);
nodeSetSocketAvailability(ntree, socket_float_mean, data_type == CD_PROP_FLOAT);
@@ -100,7 +100,7 @@ static void node_update(bNodeTree *ntree, bNode *node)
nodeSetSocketAvailability(ntree, socket_vector_variance, data_type == CD_PROP_FLOAT3);
}
-static std::optional<CustomDataType> node_type_from_other_socket(const bNodeSocket &socket)
+static std::optional<eCustomDataType> node_type_from_other_socket(const bNodeSocket &socket)
{
switch (socket.type) {
case SOCK_FLOAT:
@@ -121,7 +121,7 @@ static void node_gather_link_searches(GatherLinkSearchOpParams &params)
const NodeDeclaration &declaration = *params.node_type().fixed_declaration;
search_link_ops_for_declarations(params, declaration.inputs().take_front(2));
- const std::optional<CustomDataType> type = node_type_from_other_socket(params.other_socket());
+ const std::optional<eCustomDataType> type = node_type_from_other_socket(params.other_socket());
if (!type) {
return;
}
@@ -184,8 +184,8 @@ static void node_geo_exec(GeoNodeExecParams params)
{
GeometrySet geometry_set = params.get_input<GeometrySet>("Geometry");
const bNode &node = params.node();
- const CustomDataType data_type = static_cast<CustomDataType>(node.custom1);
- const AttributeDomain domain = static_cast<AttributeDomain>(node.custom2);
+ const eCustomDataType data_type = static_cast<eCustomDataType>(node.custom1);
+ const eAttrDomain domain = static_cast<eAttrDomain>(node.custom2);
Vector<const GeometryComponent *> components = geometry_set.get_components_for_read();
const Field<bool> selection_field = params.get_input<Field<bool>>("Selection");
diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_endpoint_selection.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_endpoint_selection.cc
index bbc8758952d..b52bf2571b5 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_curve_endpoint_selection.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_curve_endpoint_selection.cc
@@ -41,7 +41,7 @@ class EndpointFieldInput final : public GeometryFieldInput {
}
GVArray get_varray_for_context(const GeometryComponent &component,
- const AttributeDomain domain,
+ const eAttrDomain domain,
IndexMask UNUSED(mask)) const final
{
if (component.type() != GEO_COMPONENT_TYPE_CURVE || domain != ATTR_DOMAIN_POINT) {
diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_handle_type_selection.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_handle_type_selection.cc
index dc2b9d40894..5ef20f03f28 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_curve_handle_type_selection.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_curve_handle_type_selection.cc
@@ -84,7 +84,7 @@ class HandleTypeFieldInput final : public GeometryFieldInput {
}
GVArray get_varray_for_context(const GeometryComponent &component,
- const AttributeDomain domain,
+ const eAttrDomain domain,
IndexMask mask) const final
{
if (component.type() != GEO_COMPONENT_TYPE_CURVE || domain != ATTR_DOMAIN_POINT) {
diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_spline_parameter.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_spline_parameter.cc
index ae36248b573..8401c94be4b 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_curve_spline_parameter.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_curve_spline_parameter.cc
@@ -107,7 +107,7 @@ static Array<float> curve_length_point_domain(const bke::CurvesGeometry &curves)
static VArray<float> construct_curve_parameter_varray(const bke::CurvesGeometry &curves,
const IndexMask UNUSED(mask),
- const AttributeDomain domain)
+ const eAttrDomain domain)
{
VArray<bool> cyclic = curves.cyclic();
@@ -146,7 +146,7 @@ static VArray<float> construct_curve_parameter_varray(const bke::CurvesGeometry
static VArray<float> construct_curve_length_parameter_varray(const bke::CurvesGeometry &curves,
const IndexMask UNUSED(mask),
- const AttributeDomain domain)
+ const eAttrDomain domain)
{
curves.ensure_evaluated_lengths();
@@ -165,7 +165,7 @@ static VArray<float> construct_curve_length_parameter_varray(const bke::CurvesGe
static VArray<int> construct_index_on_spline_varray(const bke::CurvesGeometry &curves,
const IndexMask UNUSED(mask),
- const AttributeDomain domain)
+ const eAttrDomain domain)
{
if (domain == ATTR_DOMAIN_POINT) {
Array<int> result(curves.points_num());
@@ -191,7 +191,7 @@ class CurveParameterFieldInput final : public GeometryFieldInput {
}
GVArray get_varray_for_context(const GeometryComponent &component,
- const AttributeDomain domain,
+ const eAttrDomain domain,
IndexMask mask) const final
{
if (component.type() == GEO_COMPONENT_TYPE_CURVE) {
@@ -225,7 +225,7 @@ class CurveLengthParameterFieldInput final : public GeometryFieldInput {
}
GVArray get_varray_for_context(const GeometryComponent &component,
- const AttributeDomain domain,
+ const eAttrDomain domain,
IndexMask mask) const final
{
if (component.type() == GEO_COMPONENT_TYPE_CURVE) {
@@ -259,7 +259,7 @@ class IndexOnSplineFieldInput final : public GeometryFieldInput {
}
GVArray get_varray_for_context(const GeometryComponent &component,
- const AttributeDomain domain,
+ const eAttrDomain domain,
IndexMask mask) const final
{
if (component.type() == GEO_COMPONENT_TYPE_CURVE) {
diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc
index 73b2c400e90..7d83b4b3ecb 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc
@@ -124,7 +124,7 @@ static Array<int> calculate_spline_point_offsets(GeoNodeExecParams &params,
*/
static GMutableSpan ensure_point_attribute(PointCloudComponent &points,
const AttributeIDRef &attribute_id,
- const CustomDataType data_type)
+ const eCustomDataType data_type)
{
points.attribute_try_create(attribute_id, ATTR_DOMAIN_POINT, data_type, AttributeInitDefault());
WriteAttributeLookup attribute = points.attribute_try_get_for_write(attribute_id);
diff --git a/source/blender/nodes/geometry/nodes/node_geo_delete_geometry.cc b/source/blender/nodes/geometry/nodes/node_geo_delete_geometry.cc
index 99edc4d298c..5350896e93d 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_delete_geometry.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_delete_geometry.cc
@@ -57,7 +57,7 @@ static IndexMask index_mask_indices(Span<bool> mask, const bool invert, Vector<i
static void copy_attributes(const Map<AttributeIDRef, AttributeKind> &attributes,
const GeometryComponent &in_component,
GeometryComponent &result_component,
- const Span<AttributeDomain> domains)
+ const Span<eAttrDomain> domains)
{
for (Map<AttributeIDRef, AttributeKind>::Item entry : attributes.items()) {
const AttributeIDRef attribute_id = entry.key;
@@ -70,7 +70,7 @@ static void copy_attributes(const Map<AttributeIDRef, AttributeKind> &attributes
if (!domains.contains(attribute.domain)) {
continue;
}
- const CustomDataType data_type = bke::cpp_type_to_custom_data_type(attribute.varray.type());
+ const eCustomDataType data_type = bke::cpp_type_to_custom_data_type(attribute.varray.type());
OutputAttribute result_attribute = result_component.attribute_try_get_for_output_only(
attribute_id, attribute.domain, data_type);
@@ -96,7 +96,7 @@ static void copy_attributes(const Map<AttributeIDRef, AttributeKind> &attributes
static void copy_attributes_based_on_mask(const Map<AttributeIDRef, AttributeKind> &attributes,
const GeometryComponent &in_component,
GeometryComponent &result_component,
- const AttributeDomain domain,
+ const eAttrDomain domain,
const IndexMask mask)
{
for (Map<AttributeIDRef, AttributeKind>::Item entry : attributes.items()) {
@@ -110,7 +110,7 @@ static void copy_attributes_based_on_mask(const Map<AttributeIDRef, AttributeKin
if (domain != attribute.domain) {
continue;
}
- const CustomDataType data_type = bke::cpp_type_to_custom_data_type(attribute.varray.type());
+ const eCustomDataType data_type = bke::cpp_type_to_custom_data_type(attribute.varray.type());
OutputAttribute result_attribute = result_component.attribute_try_get_for_output_only(
attribute_id, attribute.domain, data_type);
@@ -132,7 +132,7 @@ static void copy_attributes_based_on_mask(const Map<AttributeIDRef, AttributeKin
static void copy_attributes_based_on_map(const Map<AttributeIDRef, AttributeKind> &attributes,
const GeometryComponent &in_component,
GeometryComponent &result_component,
- const AttributeDomain domain,
+ const eAttrDomain domain,
const Span<int> index_map)
{
for (Map<AttributeIDRef, AttributeKind>::Item entry : attributes.items()) {
@@ -146,7 +146,7 @@ static void copy_attributes_based_on_map(const Map<AttributeIDRef, AttributeKind
if (domain != attribute.domain) {
continue;
}
- const CustomDataType data_type = bke::cpp_type_to_custom_data_type(attribute.varray.type());
+ const eCustomDataType data_type = bke::cpp_type_to_custom_data_type(attribute.varray.type());
OutputAttribute result_attribute = result_component.attribute_try_get_for_output_only(
attribute_id, attribute.domain, data_type);
@@ -400,7 +400,7 @@ static SplinePtr spline_delete(const Spline &spline, const IndexMask mask)
static std::unique_ptr<CurveEval> curve_separate(const CurveEval &input_curve,
const Span<bool> selection,
- const AttributeDomain selection_domain,
+ const eAttrDomain selection_domain,
const bool invert)
{
Span<SplinePtr> input_splines = input_curve.splines();
@@ -463,7 +463,7 @@ static std::unique_ptr<CurveEval> curve_separate(const CurveEval &input_curve,
static void separate_curve_selection(GeometrySet &geometry_set,
const Field<bool> &selection_field,
- const AttributeDomain selection_domain,
+ const eAttrDomain selection_domain,
const bool invert)
{
const CurveComponent &src_component = *geometry_set.get_component_for_read<CurveComponent>();
@@ -987,7 +987,7 @@ static void do_mesh_separation(GeometrySet &geometry_set,
const MeshComponent &in_component,
const VArray_Span<bool> &selection,
const bool invert,
- const AttributeDomain domain,
+ const eAttrDomain domain,
const GeometryNodeDeleteGeometryMode mode)
{
/* Needed in all cases. */
@@ -1230,7 +1230,7 @@ static void do_mesh_separation(GeometrySet &geometry_set,
static void separate_mesh_selection(GeometrySet &geometry_set,
const Field<bool> &selection_field,
- const AttributeDomain selection_domain,
+ const eAttrDomain selection_domain,
const GeometryNodeDeleteGeometryMode mode,
const bool invert)
{
@@ -1263,7 +1263,7 @@ static void separate_mesh_selection(GeometrySet &geometry_set,
namespace blender::nodes {
void separate_geometry(GeometrySet &geometry_set,
- const AttributeDomain domain,
+ const eAttrDomain domain,
const GeometryNodeDeleteGeometryMode mode,
const Field<bool> &selection_field,
const bool invert,
@@ -1320,7 +1320,7 @@ static void node_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
const bNode *node = static_cast<bNode *>(ptr->data);
const NodeGeometryDeleteGeometry &storage = node_storage(*node);
- const AttributeDomain domain = static_cast<AttributeDomain>(storage.domain);
+ const eAttrDomain domain = static_cast<eAttrDomain>(storage.domain);
uiItemR(layout, ptr, "domain", 0, "", ICON_NONE);
/* Only show the mode when it is relevant. */
@@ -1345,7 +1345,7 @@ static void node_geo_exec(GeoNodeExecParams params)
const Field<bool> selection_field = params.extract_input<Field<bool>>("Selection");
const NodeGeometryDeleteGeometry &storage = node_storage(params.node());
- const AttributeDomain domain = static_cast<AttributeDomain>(storage.domain);
+ const eAttrDomain domain = static_cast<eAttrDomain>(storage.domain);
const GeometryNodeDeleteGeometryMode mode = (GeometryNodeDeleteGeometryMode)storage.mode;
if (domain == ATTR_DOMAIN_INSTANCE) {
diff --git a/source/blender/nodes/geometry/nodes/node_geo_distribute_points_on_faces.cc b/source/blender/nodes/geometry/nodes/node_geo_distribute_points_on_faces.cc
index c242cfd5cf3..f95601813a3 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_distribute_points_on_faces.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_distribute_points_on_faces.cc
@@ -247,7 +247,7 @@ BLI_NOINLINE static void eliminate_points_based_on_mask(const Span<bool> elimina
BLI_NOINLINE static void interpolate_attribute(const Mesh &mesh,
const Span<float3> bary_coords,
const Span<int> looptri_indices,
- const AttributeDomain source_domain,
+ const eAttrDomain source_domain,
const GVArray &source_data,
GMutableSpan output_data)
{
@@ -293,7 +293,7 @@ BLI_NOINLINE static void propagate_existing_attributes(
for (Map<AttributeIDRef, AttributeKind>::Item entry : attributes.items()) {
const AttributeIDRef attribute_id = entry.key;
- const CustomDataType output_data_type = entry.value.data_type;
+ const eCustomDataType output_data_type = entry.value.data_type;
ReadAttributeLookup source_attribute = mesh_component.attribute_try_get_for_read(attribute_id);
if (!source_attribute) {
@@ -396,7 +396,7 @@ static Array<float> calc_full_density_factors_with_selection(const MeshComponent
const Field<float> &density_field,
const Field<bool> &selection_field)
{
- const AttributeDomain attribute_domain = ATTR_DOMAIN_CORNER;
+ const eAttrDomain attribute_domain = ATTR_DOMAIN_CORNER;
GeometryComponentFieldContext field_context{component, attribute_domain};
const int domain_num = component.attribute_domain_num(attribute_domain);
diff --git a/source/blender/nodes/geometry/nodes/node_geo_dual_mesh.cc b/source/blender/nodes/geometry/nodes/node_geo_dual_mesh.cc
index dcd9bcfb034..52156b59c51 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_dual_mesh.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_dual_mesh.cc
@@ -153,7 +153,7 @@ static void transfer_attributes(
continue;
}
- AttributeDomain out_domain;
+ eAttrDomain out_domain;
if (src_attribute.domain == ATTR_DOMAIN_FACE) {
out_domain = ATTR_DOMAIN_POINT;
}
@@ -164,7 +164,7 @@ static void transfer_attributes(
/* Edges and Face Corners. */
out_domain = src_attribute.domain;
}
- const CustomDataType data_type = bke::cpp_type_to_custom_data_type(
+ const eCustomDataType data_type = bke::cpp_type_to_custom_data_type(
src_attribute.varray.type());
OutputAttribute dst_attribute = dst_component.attribute_try_get_for_output_only(
attribute_id, out_domain, data_type);
diff --git a/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc b/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc
index ebf0c450605..57f8ee395a9 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc
@@ -144,7 +144,7 @@ static void threaded_id_offset_copy(const Span<int> offsets,
/** Create the copy indices for the duplication domain. */
static void create_duplicate_index_attribute(GeometryComponent &component,
- const AttributeDomain output_domain,
+ const eAttrDomain output_domain,
const IndexMask selection,
const IndexAttributes &attribute_outputs,
const Span<int> offsets)
@@ -208,8 +208,8 @@ static void copy_point_attributes_without_id(GeometrySet &geometry_set,
if (!src_attribute || src_attribute.domain != ATTR_DOMAIN_POINT) {
continue;
}
- AttributeDomain out_domain = src_attribute.domain;
- const CustomDataType data_type = bke::cpp_type_to_custom_data_type(
+ eAttrDomain out_domain = src_attribute.domain;
+ const eCustomDataType data_type = bke::cpp_type_to_custom_data_type(
src_attribute.varray.type());
OutputAttribute dst_attribute = dst_component.attribute_try_get_for_output_only(
attribute_id, out_domain, data_type);
@@ -254,8 +254,8 @@ static void copy_curve_attributes_without_id(const GeometrySet &geometry_set,
continue;
}
- AttributeDomain out_domain = src_attribute.domain;
- const CustomDataType data_type = bke::cpp_type_to_custom_data_type(
+ eAttrDomain out_domain = src_attribute.domain;
+ const eCustomDataType data_type = bke::cpp_type_to_custom_data_type(
src_attribute.varray.type());
OutputAttribute dst_attribute = dst_component.attribute_try_get_for_output_only(
attribute_id, out_domain, data_type);
@@ -435,8 +435,8 @@ static void copy_face_attributes_without_id(GeometrySet &geometry_set,
continue;
}
- AttributeDomain out_domain = src_attribute.domain;
- const CustomDataType data_type = bke::cpp_type_to_custom_data_type(
+ eAttrDomain out_domain = src_attribute.domain;
+ const eCustomDataType data_type = bke::cpp_type_to_custom_data_type(
src_attribute.varray.type());
OutputAttribute dst_attribute = dst_component.attribute_try_get_for_output_only(
attribute_id, out_domain, data_type);
@@ -648,8 +648,8 @@ static void copy_edge_attributes_without_id(GeometrySet &geometry_set,
continue;
}
- const AttributeDomain out_domain = src_attribute.domain;
- const CustomDataType data_type = bke::cpp_type_to_custom_data_type(
+ const eAttrDomain out_domain = src_attribute.domain;
+ const eCustomDataType data_type = bke::cpp_type_to_custom_data_type(
src_attribute.varray.type());
OutputAttribute dst_attribute = dst_component.attribute_try_get_for_output_only(
attribute_id, out_domain, data_type);
@@ -849,8 +849,8 @@ static void duplicate_points_curve(GeometrySet &geometry_set,
continue;
}
- AttributeDomain domain = src_attribute.domain;
- const CustomDataType data_type = bke::cpp_type_to_custom_data_type(
+ eAttrDomain domain = src_attribute.domain;
+ const eCustomDataType data_type = bke::cpp_type_to_custom_data_type(
src_attribute.varray.type());
OutputAttribute dst_attribute = dst_component.attribute_try_get_for_output_only(
attribute_id, domain, data_type);
@@ -1103,7 +1103,7 @@ static void node_geo_exec(GeoNodeExecParams params)
GeometrySet geometry_set = params.extract_input<GeometrySet>("Geometry");
const NodeGeometryDuplicateElements &storage = node_storage(params.node());
- const AttributeDomain duplicate_domain = AttributeDomain(storage.domain);
+ const eAttrDomain duplicate_domain = eAttrDomain(storage.domain);
Field<int> count_field = params.extract_input<Field<int>>("Amount");
Field<bool> selection_field = params.extract_input<Field<bool>>("Selection");
diff --git a/source/blender/nodes/geometry/nodes/node_geo_extrude_mesh.cc b/source/blender/nodes/geometry/nodes/node_geo_extrude_mesh.cc
index 1f16e8d55bd..25c7840d633 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_extrude_mesh.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_extrude_mesh.cc
@@ -63,7 +63,7 @@ struct AttributeOutputs {
static void save_selection_as_attribute(MeshComponent &component,
const AnonymousAttributeID *id,
- const AttributeDomain domain,
+ const eAttrDomain domain,
const IndexMask selection)
{
BLI_assert(!component.attribute_exists(id));
diff --git a/source/blender/nodes/geometry/nodes/node_geo_field_at_index.cc b/source/blender/nodes/geometry/nodes/node_geo_field_at_index.cc
index bf956f3b83d..58281df43d3 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_field_at_index.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_field_at_index.cc
@@ -42,7 +42,7 @@ static void node_init(bNodeTree *UNUSED(tree), bNode *node)
static void node_update(bNodeTree *ntree, bNode *node)
{
- const CustomDataType data_type = static_cast<CustomDataType>(node->custom2);
+ const eCustomDataType data_type = static_cast<eCustomDataType>(node->custom2);
bNodeSocket *sock_index = static_cast<bNodeSocket *>(node->inputs.first);
bNodeSocket *sock_in_float = sock_index->next;
@@ -74,10 +74,10 @@ class FieldAtIndex final : public GeometryFieldInput {
private:
Field<int> index_field_;
GField value_field_;
- AttributeDomain value_field_domain_;
+ eAttrDomain value_field_domain_;
public:
- FieldAtIndex(Field<int> index_field, GField value_field, AttributeDomain value_field_domain)
+ FieldAtIndex(Field<int> index_field, GField value_field, eAttrDomain value_field_domain)
: GeometryFieldInput(value_field.cpp_type(), "Field at Index"),
index_field_(std::move(index_field)),
value_field_(std::move(value_field)),
@@ -86,7 +86,7 @@ class FieldAtIndex final : public GeometryFieldInput {
}
GVArray get_varray_for_context(const GeometryComponent &component,
- const AttributeDomain domain,
+ const eAttrDomain domain,
IndexMask mask) const final
{
const GeometryComponentFieldContext value_field_context{component, value_field_domain_};
@@ -125,7 +125,7 @@ class FieldAtIndex final : public GeometryFieldInput {
}
};
-static StringRefNull identifier_suffix(CustomDataType data_type)
+static StringRefNull identifier_suffix(eCustomDataType data_type)
{
switch (data_type) {
case CD_PROP_BOOL:
@@ -147,8 +147,8 @@ static StringRefNull identifier_suffix(CustomDataType data_type)
static void node_geo_exec(GeoNodeExecParams params)
{
const bNode &node = params.node();
- const AttributeDomain domain = static_cast<AttributeDomain>(node.custom1);
- const CustomDataType data_type = static_cast<CustomDataType>(node.custom2);
+ const eAttrDomain domain = static_cast<eAttrDomain>(node.custom1);
+ const eCustomDataType data_type = static_cast<eCustomDataType>(node.custom2);
Field<int> index_field = params.extract_input<Field<int>>("Index");
attribute_math::convert_to_static_type(data_type, [&](auto dummy) {
diff --git a/source/blender/nodes/geometry/nodes/node_geo_input_curve_handles.cc b/source/blender/nodes/geometry/nodes/node_geo_input_curve_handles.cc
index 3ba1378abe1..da249278867 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_input_curve_handles.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_input_curve_handles.cc
@@ -26,7 +26,7 @@ class HandlePositionFieldInput final : public GeometryFieldInput {
}
GVArray get_varray_for_context(const GeometryComponent &component,
- const AttributeDomain domain,
+ const eAttrDomain domain,
IndexMask mask) const final
{
if (component.type() != GEO_COMPONENT_TYPE_CURVE) {
diff --git a/source/blender/nodes/geometry/nodes/node_geo_input_mesh_edge_angle.cc b/source/blender/nodes/geometry/nodes/node_geo_input_mesh_edge_angle.cc
index 60640bcb112..f27e0305c7d 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_input_mesh_edge_angle.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_input_mesh_edge_angle.cc
@@ -61,7 +61,7 @@ class AngleFieldInput final : public GeometryFieldInput {
}
GVArray get_varray_for_context(const GeometryComponent &component,
- const AttributeDomain domain,
+ const eAttrDomain domain,
IndexMask UNUSED(mask)) const final
{
if (component.type() != GEO_COMPONENT_TYPE_MESH) {
@@ -115,7 +115,7 @@ class SignedAngleFieldInput final : public GeometryFieldInput {
}
GVArray get_varray_for_context(const GeometryComponent &component,
- const AttributeDomain domain,
+ const eAttrDomain domain,
IndexMask UNUSED(mask)) const final
{
if (component.type() != GEO_COMPONENT_TYPE_MESH) {
diff --git a/source/blender/nodes/geometry/nodes/node_geo_input_mesh_edge_neighbors.cc b/source/blender/nodes/geometry/nodes/node_geo_input_mesh_edge_neighbors.cc
index 92172ce7ebd..cbc2ebc3e68 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_input_mesh_edge_neighbors.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_input_mesh_edge_neighbors.cc
@@ -25,7 +25,7 @@ class EdgeNeighborCountFieldInput final : public GeometryFieldInput {
}
GVArray get_varray_for_context(const GeometryComponent &component,
- const AttributeDomain domain,
+ const eAttrDomain domain,
IndexMask UNUSED(mask)) const final
{
if (component.type() == GEO_COMPONENT_TYPE_MESH) {
diff --git a/source/blender/nodes/geometry/nodes/node_geo_input_mesh_edge_vertices.cc b/source/blender/nodes/geometry/nodes/node_geo_input_mesh_edge_vertices.cc
index 213a692d80f..6201ad26bfb 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_input_mesh_edge_vertices.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_input_mesh_edge_vertices.cc
@@ -29,7 +29,7 @@ enum VertexNumber { VERTEX_ONE, VERTEX_TWO };
static VArray<int> construct_edge_vertices_gvarray(const MeshComponent &component,
const VertexNumber vertex,
- const AttributeDomain domain)
+ const eAttrDomain domain)
{
const Mesh *mesh = component.get_for_read();
if (mesh == nullptr) {
@@ -58,7 +58,7 @@ class EdgeVerticesFieldInput final : public GeometryFieldInput {
}
GVArray get_varray_for_context(const GeometryComponent &component,
- const AttributeDomain domain,
+ const eAttrDomain domain,
IndexMask UNUSED(mask)) const final
{
if (component.type() == GEO_COMPONENT_TYPE_MESH) {
@@ -85,7 +85,7 @@ class EdgeVerticesFieldInput final : public GeometryFieldInput {
static VArray<float3> construct_edge_positions_gvarray(const MeshComponent &component,
const VertexNumber vertex,
- const AttributeDomain domain)
+ const eAttrDomain domain)
{
const Mesh *mesh = component.get_for_read();
if (mesh == nullptr) {
@@ -120,7 +120,7 @@ class EdgePositionFieldInput final : public GeometryFieldInput {
}
GVArray get_varray_for_context(const GeometryComponent &component,
- const AttributeDomain domain,
+ const eAttrDomain domain,
IndexMask UNUSED(mask)) const final
{
if (component.type() == GEO_COMPONENT_TYPE_MESH) {
diff --git a/source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_area.cc b/source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_area.cc
index 6f58d28100a..7a0e3e37a65 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_area.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_area.cc
@@ -17,7 +17,7 @@ static void node_declare(NodeDeclarationBuilder &b)
}
static VArray<float> construct_face_area_gvarray(const MeshComponent &component,
- const AttributeDomain domain)
+ const eAttrDomain domain)
{
const Mesh *mesh = component.get_for_read();
if (mesh == nullptr) {
@@ -41,7 +41,7 @@ class FaceAreaFieldInput final : public GeometryFieldInput {
}
GVArray get_varray_for_context(const GeometryComponent &component,
- const AttributeDomain domain,
+ const eAttrDomain domain,
IndexMask UNUSED(mask)) const final
{
if (component.type() == GEO_COMPONENT_TYPE_MESH) {
diff --git a/source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_is_planar.cc b/source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_is_planar.cc
index 62af0476057..c400760f902 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_is_planar.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_is_planar.cc
@@ -34,7 +34,7 @@ class PlanarFieldInput final : public GeometryFieldInput {
}
GVArray get_varray_for_context(const GeometryComponent &component,
- const AttributeDomain domain,
+ const eAttrDomain domain,
[[maybe_unused]] IndexMask mask) const final
{
if (component.type() != GEO_COMPONENT_TYPE_MESH) {
diff --git a/source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_neighbors.cc b/source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_neighbors.cc
index 9968c53f649..67a21cb06f0 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_neighbors.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_neighbors.cc
@@ -20,7 +20,7 @@ static void node_declare(NodeDeclarationBuilder &b)
}
static VArray<int> construct_neighbor_count_gvarray(const MeshComponent &component,
- const AttributeDomain domain)
+ const eAttrDomain domain)
{
const Mesh *mesh = component.get_for_read();
if (mesh == nullptr) {
@@ -53,7 +53,7 @@ class FaceNeighborCountFieldInput final : public GeometryFieldInput {
}
GVArray get_varray_for_context(const GeometryComponent &component,
- const AttributeDomain domain,
+ const eAttrDomain domain,
IndexMask UNUSED(mask)) const final
{
if (component.type() == GEO_COMPONENT_TYPE_MESH) {
@@ -76,7 +76,7 @@ class FaceNeighborCountFieldInput final : public GeometryFieldInput {
};
static VArray<int> construct_vertex_count_gvarray(const MeshComponent &component,
- const AttributeDomain domain)
+ const eAttrDomain domain)
{
const Mesh *mesh = component.get_for_read();
if (mesh == nullptr) {
@@ -98,7 +98,7 @@ class FaceVertexCountFieldInput final : public GeometryFieldInput {
}
GVArray get_varray_for_context(const GeometryComponent &component,
- const AttributeDomain domain,
+ const eAttrDomain domain,
IndexMask UNUSED(mask)) const final
{
if (component.type() == GEO_COMPONENT_TYPE_MESH) {
diff --git a/source/blender/nodes/geometry/nodes/node_geo_input_mesh_island.cc b/source/blender/nodes/geometry/nodes/node_geo_input_mesh_island.cc
index 8e3a9b6769d..bd57924d685 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_input_mesh_island.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_input_mesh_island.cc
@@ -30,7 +30,7 @@ class IslandFieldInput final : public GeometryFieldInput {
}
GVArray get_varray_for_context(const GeometryComponent &component,
- const AttributeDomain domain,
+ const eAttrDomain domain,
IndexMask UNUSED(mask)) const final
{
if (component.type() != GEO_COMPONENT_TYPE_MESH) {
@@ -78,7 +78,7 @@ class IslandCountFieldInput final : public GeometryFieldInput {
}
GVArray get_varray_for_context(const GeometryComponent &component,
- const AttributeDomain domain,
+ const eAttrDomain domain,
IndexMask UNUSED(mask)) const final
{
if (component.type() != GEO_COMPONENT_TYPE_MESH) {
diff --git a/source/blender/nodes/geometry/nodes/node_geo_input_mesh_vertex_neighbors.cc b/source/blender/nodes/geometry/nodes/node_geo_input_mesh_vertex_neighbors.cc
index b81016eda18..62b3f9d0e92 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_input_mesh_vertex_neighbors.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_input_mesh_vertex_neighbors.cc
@@ -21,7 +21,7 @@ static void node_declare(NodeDeclarationBuilder &b)
}
static VArray<int> construct_vertex_count_gvarray(const MeshComponent &component,
- const AttributeDomain domain)
+ const eAttrDomain domain)
{
const Mesh *mesh = component.get_for_read();
if (mesh == nullptr) {
@@ -47,7 +47,7 @@ class VertexCountFieldInput final : public GeometryFieldInput {
}
GVArray get_varray_for_context(const GeometryComponent &component,
- const AttributeDomain domain,
+ const eAttrDomain domain,
IndexMask UNUSED(mask)) const final
{
if (component.type() == GEO_COMPONENT_TYPE_MESH) {
@@ -70,7 +70,7 @@ class VertexCountFieldInput final : public GeometryFieldInput {
};
static VArray<int> construct_face_count_gvarray(const MeshComponent &component,
- const AttributeDomain domain)
+ const eAttrDomain domain)
{
const Mesh *mesh = component.get_for_read();
if (mesh == nullptr) {
@@ -96,7 +96,7 @@ class VertexFaceCountFieldInput final : public GeometryFieldInput {
}
GVArray get_varray_for_context(const GeometryComponent &component,
- const AttributeDomain domain,
+ const eAttrDomain domain,
IndexMask UNUSED(mask)) const final
{
if (component.type() == GEO_COMPONENT_TYPE_MESH) {
diff --git a/source/blender/nodes/geometry/nodes/node_geo_input_named_attribute.cc b/source/blender/nodes/geometry/nodes/node_geo_input_named_attribute.cc
index 553ea6cfcf0..122c7b352c7 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_input_named_attribute.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_input_named_attribute.cc
@@ -37,7 +37,7 @@ static void node_init(bNodeTree *UNUSED(tree), bNode *node)
static void node_update(bNodeTree *ntree, bNode *node)
{
const NodeGeometryInputNamedAttribute &storage = node_storage(*node);
- const CustomDataType data_type = static_cast<CustomDataType>(storage.data_type);
+ const eCustomDataType data_type = static_cast<eCustomDataType>(storage.data_type);
bNodeSocket *socket_vector = (bNodeSocket *)node->outputs.first;
bNodeSocket *socket_float = socket_vector->next;
@@ -58,7 +58,7 @@ static void node_gather_link_searches(GatherLinkSearchOpParams &params)
search_link_ops_for_declarations(params, declaration.inputs());
if (params.in_out() == SOCK_OUT) {
- const std::optional<CustomDataType> type = node_data_type_to_custom_data_type(
+ const std::optional<eCustomDataType> type = node_data_type_to_custom_data_type(
static_cast<eNodeSocketDatatype>(params.other_socket().type));
if (type && *type != CD_PROP_STRING) {
/* The input and output sockets have the same name. */
@@ -74,7 +74,7 @@ static void node_gather_link_searches(GatherLinkSearchOpParams &params)
static void node_geo_exec(GeoNodeExecParams params)
{
const NodeGeometryInputNamedAttribute &storage = node_storage(params.node());
- const CustomDataType data_type = static_cast<CustomDataType>(storage.data_type);
+ const eCustomDataType data_type = static_cast<eCustomDataType>(storage.data_type);
const std::string name = params.extract_input<std::string>("Name");
@@ -88,7 +88,7 @@ static void node_geo_exec(GeoNodeExecParams params)
return;
}
- params.used_named_attribute(name, NamedAttributeUsage::Read);
+ params.used_named_attribute(name, eNamedAttrUsage::Read);
switch (data_type) {
case CD_PROP_FLOAT:
diff --git a/source/blender/nodes/geometry/nodes/node_geo_input_spline_length.cc b/source/blender/nodes/geometry/nodes/node_geo_input_spline_length.cc
index 84d773ff8eb..def82eefca5 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_input_spline_length.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_input_spline_length.cc
@@ -17,7 +17,7 @@ static void node_declare(NodeDeclarationBuilder &b)
*/
static VArray<int> construct_curve_point_count_gvarray(const CurveComponent &component,
- const AttributeDomain domain)
+ const eAttrDomain domain)
{
if (!component.has_curves()) {
return {};
@@ -47,7 +47,7 @@ class SplineCountFieldInput final : public GeometryFieldInput {
}
GVArray get_varray_for_context(const GeometryComponent &component,
- const AttributeDomain domain,
+ const eAttrDomain domain,
IndexMask UNUSED(mask)) const final
{
if (component.type() == GEO_COMPONENT_TYPE_CURVE) {
diff --git a/source/blender/nodes/geometry/nodes/node_geo_input_tangent.cc b/source/blender/nodes/geometry/nodes/node_geo_input_tangent.cc
index 039d6b69585..f5831941094 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_input_tangent.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_input_tangent.cc
@@ -64,7 +64,7 @@ static Array<float3> curve_tangent_point_domain(const bke::CurvesGeometry &curve
}
static VArray<float3> construct_curve_tangent_gvarray(const CurveComponent &component,
- const AttributeDomain domain)
+ const eAttrDomain domain)
{
if (!component.has_curves()) {
return {};
@@ -101,7 +101,7 @@ class TangentFieldInput final : public GeometryFieldInput {
}
GVArray get_varray_for_context(const GeometryComponent &component,
- const AttributeDomain domain,
+ const eAttrDomain domain,
IndexMask UNUSED(mask)) const final
{
if (component.type() == GEO_COMPONENT_TYPE_CURVE) {
diff --git a/source/blender/nodes/geometry/nodes/node_geo_instance_on_points.cc b/source/blender/nodes/geometry/nodes/node_geo_instance_on_points.cc
index 12582f9e9c6..21ef8765e43 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_instance_on_points.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_instance_on_points.cc
@@ -49,7 +49,7 @@ static void add_instances_from_component(
const GeoNodeExecParams &params,
const Map<AttributeIDRef, AttributeKind> &attributes_to_propagate)
{
- const AttributeDomain domain = ATTR_DOMAIN_POINT;
+ const eAttrDomain domain = ATTR_DOMAIN_POINT;
const int domain_num = src_component.attribute_domain_num(domain);
VArray<bool> pick_instance;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc b/source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc
index 2067086c298..0c56b0e9804 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc
@@ -47,8 +47,8 @@ static Map<AttributeIDRef, AttributeMetaData> get_final_attribute_info(
static void fill_new_attribute(Span<const GeometryComponent *> src_components,
const AttributeIDRef &attribute_id,
- const CustomDataType data_type,
- const AttributeDomain domain,
+ const eCustomDataType data_type,
+ const eAttrDomain domain,
GMutableSpan dst_span)
{
const CPPType *cpp_type = bke::custom_data_type_to_cpp_type(data_type);
diff --git a/source/blender/nodes/geometry/nodes/node_geo_material_selection.cc b/source/blender/nodes/geometry/nodes/node_geo_material_selection.cc
index c245260f259..5875606da97 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_material_selection.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_material_selection.cc
@@ -51,7 +51,7 @@ class MaterialSelectionFieldInput final : public GeometryFieldInput {
}
GVArray get_varray_for_context(const GeometryComponent &component,
- const AttributeDomain domain,
+ const eAttrDomain domain,
IndexMask mask) const final
{
if (component.type() != GEO_COMPONENT_TYPE_MESH) {
diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_to_points.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_to_points.cc
index 6b23b685549..7463eb01471 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_mesh_to_points.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_to_points.cc
@@ -58,7 +58,7 @@ static void geometry_set_mesh_to_points(GeometrySet &geometry_set,
Field<float3> &position_field,
Field<float> &radius_field,
Field<bool> &selection_field,
- const AttributeDomain domain)
+ const eAttrDomain domain)
{
const MeshComponent *mesh_component = geometry_set.get_component_for_read<MeshComponent>();
if (mesh_component == nullptr) {
@@ -105,7 +105,7 @@ static void geometry_set_mesh_to_points(GeometrySet &geometry_set,
for (Map<AttributeIDRef, AttributeKind>::Item entry : attributes.items()) {
const AttributeIDRef attribute_id = entry.key;
- const CustomDataType data_type = entry.value.data_type;
+ const eCustomDataType data_type = entry.value.data_type;
GVArray src = mesh_component->attribute_get_for_read(attribute_id, domain, data_type);
OutputAttribute dst = point_component.attribute_try_get_for_output_only(
attribute_id, ATTR_DOMAIN_POINT, data_type);
diff --git a/source/blender/nodes/geometry/nodes/node_geo_points_to_vertices.cc b/source/blender/nodes/geometry/nodes/node_geo_points_to_vertices.cc
index 577b001fd06..00b3d167755 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_points_to_vertices.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_points_to_vertices.cc
@@ -59,7 +59,7 @@ static void geometry_set_points_to_vertices(GeometrySet &geometry_set,
for (Map<AttributeIDRef, AttributeKind>::Item entry : attributes.items()) {
const AttributeIDRef attribute_id = entry.key;
- const CustomDataType data_type = entry.value.data_type;
+ const eCustomDataType data_type = entry.value.data_type;
GVArray src = point_component->attribute_get_for_read(
attribute_id, ATTR_DOMAIN_POINT, data_type);
OutputAttribute dst = mesh_component.attribute_try_get_for_output_only(
diff --git a/source/blender/nodes/geometry/nodes/node_geo_raycast.cc b/source/blender/nodes/geometry/nodes/node_geo_raycast.cc
index 0c30d50076f..a92cee2d066 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_raycast.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_raycast.cc
@@ -70,7 +70,7 @@ static void node_init(bNodeTree *UNUSED(tree), bNode *node)
static void node_update(bNodeTree *ntree, bNode *node)
{
const NodeGeometryRaycast &storage = node_storage(*node);
- const CustomDataType data_type = static_cast<CustomDataType>(storage.data_type);
+ const eCustomDataType data_type = static_cast<eCustomDataType>(storage.data_type);
bNodeSocket *socket_vector = (bNodeSocket *)BLI_findlink(&node->inputs, 1);
bNodeSocket *socket_float = socket_vector->next;
@@ -104,7 +104,7 @@ static void node_gather_link_searches(GatherLinkSearchOpParams &params)
search_link_ops_for_declarations(params, declaration.inputs().take_back(3));
search_link_ops_for_declarations(params, declaration.outputs().take_front(4));
- const std::optional<CustomDataType> type = node_data_type_to_custom_data_type(
+ const std::optional<eCustomDataType> type = node_data_type_to_custom_data_type(
(eNodeSocketDatatype)params.other_socket().type);
if (type && *type != CD_PROP_STRING) {
/* The input and output sockets have the same name. */
@@ -215,7 +215,7 @@ class RaycastFunction : public fn::MultiFunction {
/* Always evaluate the target domain data on the face corner domain because it contains the most
* information. Eventually this could be exposed as an option or determined automatically from
* the field inputs for better performance. */
- const AttributeDomain domain_ = ATTR_DOMAIN_CORNER;
+ const eAttrDomain domain_ = ATTR_DOMAIN_CORNER;
fn::MFSignature signature_;
@@ -320,7 +320,7 @@ class RaycastFunction : public fn::MultiFunction {
}
};
-static GField get_input_attribute_field(GeoNodeExecParams &params, const CustomDataType data_type)
+static GField get_input_attribute_field(GeoNodeExecParams &params, const eCustomDataType data_type)
{
switch (data_type) {
case CD_PROP_FLOAT:
@@ -387,7 +387,7 @@ static void node_geo_exec(GeoNodeExecParams params)
GeometrySet target = params.extract_input<GeometrySet>("Target Geometry");
const NodeGeometryRaycast &storage = node_storage(params.node());
const GeometryNodeRaycastMapMode mapping = (GeometryNodeRaycastMapMode)storage.mapping;
- const CustomDataType data_type = static_cast<CustomDataType>(storage.data_type);
+ const eCustomDataType data_type = static_cast<eCustomDataType>(storage.data_type);
if (target.is_empty()) {
params.set_default_remaining_outputs();
diff --git a/source/blender/nodes/geometry/nodes/node_geo_remove_attribute.cc b/source/blender/nodes/geometry/nodes/node_geo_remove_attribute.cc
index ecda35f6363..da42b8c5ee0 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_remove_attribute.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_remove_attribute.cc
@@ -55,7 +55,7 @@ static void node_geo_exec(GeoNodeExecParams params)
});
if (attribute_exists && !cannot_delete) {
- params.used_named_attribute(name, NamedAttributeUsage::Remove);
+ params.used_named_attribute(name, eNamedAttrUsage::Remove);
}
if (!attribute_exists) {
diff --git a/source/blender/nodes/geometry/nodes/node_geo_scale_elements.cc b/source/blender/nodes/geometry/nodes/node_geo_scale_elements.cc
index 7923ad6264d..698efa8865d 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_scale_elements.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_scale_elements.cc
@@ -397,7 +397,7 @@ static void scale_edges_on_axis(MeshComponent &mesh_component, const AxisScaleFi
static void node_geo_exec(GeoNodeExecParams params)
{
const bNode &node = params.node();
- const AttributeDomain domain = static_cast<AttributeDomain>(node.custom1);
+ const eAttrDomain domain = static_cast<eAttrDomain>(node.custom1);
const GeometryNodeScaleElementsMode scale_mode = static_cast<GeometryNodeScaleElementsMode>(
node.custom2);
diff --git a/source/blender/nodes/geometry/nodes/node_geo_separate_geometry.cc b/source/blender/nodes/geometry/nodes/node_geo_separate_geometry.cc
index a48d422e4c0..22712c873a3 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_separate_geometry.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_separate_geometry.cc
@@ -43,7 +43,7 @@ static void node_geo_exec(GeoNodeExecParams params)
const Field<bool> selection_field = params.extract_input<Field<bool>>("Selection");
const NodeGeometrySeparateGeometry &storage = node_storage(params.node());
- const AttributeDomain domain = static_cast<AttributeDomain>(storage.domain);
+ const eAttrDomain domain = static_cast<eAttrDomain>(storage.domain);
auto separate_geometry_maybe_recursively = [&](GeometrySet &geometry_set, bool invert) {
bool is_error;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_set_id.cc b/source/blender/nodes/geometry/nodes/node_geo_set_id.cc
index ec95f9a89f5..87d48daddea 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_set_id.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_set_id.cc
@@ -16,9 +16,9 @@ static void set_id_in_component(GeometryComponent &component,
const Field<bool> &selection_field,
const Field<int> &id_field)
{
- const AttributeDomain domain = (component.type() == GEO_COMPONENT_TYPE_INSTANCES) ?
- ATTR_DOMAIN_INSTANCE :
- ATTR_DOMAIN_POINT;
+ const eAttrDomain domain = (component.type() == GEO_COMPONENT_TYPE_INSTANCES) ?
+ ATTR_DOMAIN_INSTANCE :
+ ATTR_DOMAIN_POINT;
GeometryComponentFieldContext field_context{component, domain};
const int domain_num = component.attribute_domain_num(domain);
if (domain_num == 0) {
diff --git a/source/blender/nodes/geometry/nodes/node_geo_set_position.cc b/source/blender/nodes/geometry/nodes/node_geo_set_position.cc
index caf33108716..e9ed87e552f 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_set_position.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_set_position.cc
@@ -25,7 +25,7 @@ static void node_declare(NodeDeclarationBuilder &b)
static void set_computed_position_and_offset(GeometryComponent &component,
const VArray<float3> &in_positions,
const VArray<float3> &in_offsets,
- const AttributeDomain domain,
+ const eAttrDomain domain,
const IndexMask selection)
{
@@ -139,9 +139,8 @@ static void set_position_in_component(GeometryComponent &component,
const Field<float3> &position_field,
const Field<float3> &offset_field)
{
- AttributeDomain domain = component.type() == GEO_COMPONENT_TYPE_INSTANCES ?
- ATTR_DOMAIN_INSTANCE :
- ATTR_DOMAIN_POINT;
+ eAttrDomain domain = component.type() == GEO_COMPONENT_TYPE_INSTANCES ? ATTR_DOMAIN_INSTANCE :
+ ATTR_DOMAIN_POINT;
GeometryComponentFieldContext field_context{component, domain};
const int domain_num = component.attribute_domain_num(domain);
if (domain_num == 0) {
diff --git a/source/blender/nodes/geometry/nodes/node_geo_store_named_attribute.cc b/source/blender/nodes/geometry/nodes/node_geo_store_named_attribute.cc
index 669740f27cb..7ccdae2e5a6 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_store_named_attribute.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_store_named_attribute.cc
@@ -45,7 +45,7 @@ static void node_init(bNodeTree *UNUSED(tree), bNode *node)
static void node_update(bNodeTree *ntree, bNode *node)
{
const NodeGeometryStoreNamedAttribute &storage = node_storage(*node);
- const CustomDataType data_type = static_cast<CustomDataType>(storage.data_type);
+ const eCustomDataType data_type = static_cast<eCustomDataType>(storage.data_type);
bNodeSocket *socket_geometry = (bNodeSocket *)node->inputs.first;
bNodeSocket *socket_name = socket_geometry->next;
@@ -69,7 +69,7 @@ static void node_gather_link_searches(GatherLinkSearchOpParams &params)
search_link_ops_for_declarations(params, declaration.inputs().take_front(2));
if (params.in_out() == SOCK_OUT) {
- const std::optional<CustomDataType> type = node_data_type_to_custom_data_type(
+ const std::optional<eCustomDataType> type = node_data_type_to_custom_data_type(
static_cast<eNodeSocketDatatype>(params.other_socket().type));
if (type && *type != CD_PROP_STRING) {
/* The input and output sockets have the same name. */
@@ -84,7 +84,7 @@ static void node_gather_link_searches(GatherLinkSearchOpParams &params)
static void try_capture_field_on_geometry(GeometryComponent &component,
const StringRef name,
- const AttributeDomain domain,
+ const eAttrDomain domain,
const GField &field)
{
GeometryComponentFieldContext field_context{component, domain};
@@ -92,7 +92,7 @@ static void try_capture_field_on_geometry(GeometryComponent &component,
const IndexMask mask{IndexMask(domain_num)};
const CPPType &type = field.cpp_type();
- const CustomDataType data_type = bke::cpp_type_to_custom_data_type(type);
+ const eCustomDataType data_type = bke::cpp_type_to_custom_data_type(type);
/* Could avoid allocating a new buffer if:
* - We are writing to an attribute that exists already.
@@ -137,11 +137,11 @@ static void node_geo_exec(GeoNodeExecParams params)
return;
}
- params.used_named_attribute(name, NamedAttributeUsage::Write);
+ params.used_named_attribute(name, eNamedAttrUsage::Write);
const NodeGeometryStoreNamedAttribute &storage = node_storage(params.node());
- const CustomDataType data_type = static_cast<CustomDataType>(storage.data_type);
- const AttributeDomain domain = static_cast<AttributeDomain>(storage.domain);
+ const eCustomDataType data_type = static_cast<eCustomDataType>(storage.data_type);
+ const eAttrDomain domain = static_cast<eAttrDomain>(storage.domain);
GField field;
switch (data_type) {
diff --git a/source/blender/nodes/geometry/nodes/node_geo_transfer_attribute.cc b/source/blender/nodes/geometry/nodes/node_geo_transfer_attribute.cc
index dca214660c8..0af6c76feaf 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_transfer_attribute.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_transfer_attribute.cc
@@ -81,7 +81,7 @@ static void node_init(bNodeTree *UNUSED(tree), bNode *node)
static void node_update(bNodeTree *ntree, bNode *node)
{
const NodeGeometryTransferAttribute &storage = node_storage(*node);
- const CustomDataType data_type = static_cast<CustomDataType>(storage.data_type);
+ const eCustomDataType data_type = static_cast<eCustomDataType>(storage.data_type);
const GeometryNodeAttributeTransferMode mapping = (GeometryNodeAttributeTransferMode)
storage.mode;
@@ -123,7 +123,7 @@ static void node_gather_link_searches(GatherLinkSearchOpParams &params)
search_link_ops_for_declarations(params, declaration.inputs().take_back(2));
search_link_ops_for_declarations(params, declaration.inputs().take_front(1));
- const std::optional<CustomDataType> type = node_data_type_to_custom_data_type(
+ const std::optional<eCustomDataType> type = node_data_type_to_custom_data_type(
(eNodeSocketDatatype)params.other_socket().type);
if (type && *type != CD_PROP_STRING) {
/* The input and output sockets have the same name. */
@@ -356,7 +356,7 @@ void copy_with_indices_and_comparison(const VArray<T> &src_1,
static bool component_is_available(const GeometrySet &geometry,
const GeometryComponentType type,
- const AttributeDomain domain)
+ const eAttrDomain domain)
{
if (!geometry.has(type)) {
return false;
@@ -383,7 +383,7 @@ class NearestInterpolatedTransferFunction : public fn::MultiFunction {
* future, it should be possible to use the most complex domain required by the field inputs, to
* simplify sampling and avoid domain conversions.
*/
- AttributeDomain domain_ = ATTR_DOMAIN_CORNER;
+ eAttrDomain domain_ = ATTR_DOMAIN_CORNER;
fn::MFSignature signature_;
@@ -449,7 +449,7 @@ class NearestInterpolatedTransferFunction : public fn::MultiFunction {
class NearestTransferFunction : public fn::MultiFunction {
GeometrySet source_;
GField src_field_;
- AttributeDomain domain_;
+ eAttrDomain domain_;
fn::MFSignature signature_;
@@ -466,7 +466,7 @@ class NearestTransferFunction : public fn::MultiFunction {
const GVArray *point_data_;
public:
- NearestTransferFunction(GeometrySet geometry, GField src_field, AttributeDomain domain)
+ NearestTransferFunction(GeometrySet geometry, GField src_field, eAttrDomain domain)
: source_(std::move(geometry)), src_field_(std::move(src_field)), domain_(domain)
{
source_.ensure_owns_direct_data();
@@ -599,7 +599,7 @@ class NearestTransferFunction : public fn::MultiFunction {
};
static const GeometryComponent *find_source_component(const GeometrySet &geometry,
- const AttributeDomain domain)
+ const eAttrDomain domain)
{
/* Choose the other component based on a consistent order, rather than some more complicated
* heuristic. This is the same order visible in the spreadsheet and used in the ray-cast node. */
@@ -624,7 +624,7 @@ static const GeometryComponent *find_source_component(const GeometrySet &geometr
class IndexTransferFunction : public fn::MultiFunction {
GeometrySet src_geometry_;
GField src_field_;
- AttributeDomain domain_;
+ eAttrDomain domain_;
fn::MFSignature signature_;
@@ -633,7 +633,7 @@ class IndexTransferFunction : public fn::MultiFunction {
const GVArray *src_data_ = nullptr;
public:
- IndexTransferFunction(GeometrySet geometry, GField src_field, const AttributeDomain domain)
+ IndexTransferFunction(GeometrySet geometry, GField src_field, const eAttrDomain domain)
: src_geometry_(std::move(geometry)), src_field_(std::move(src_field)), domain_(domain)
{
src_geometry_.ensure_owns_direct_data();
@@ -684,7 +684,7 @@ class IndexTransferFunction : public fn::MultiFunction {
}
};
-static GField get_input_attribute_field(GeoNodeExecParams &params, const CustomDataType data_type)
+static GField get_input_attribute_field(GeoNodeExecParams &params, const eCustomDataType data_type)
{
switch (data_type) {
case CD_PROP_FLOAT:
@@ -737,8 +737,8 @@ static void node_geo_exec(GeoNodeExecParams params)
const NodeGeometryTransferAttribute &storage = node_storage(params.node());
const GeometryNodeAttributeTransferMode mapping = (GeometryNodeAttributeTransferMode)
storage.mode;
- const CustomDataType data_type = static_cast<CustomDataType>(storage.data_type);
- const AttributeDomain domain = static_cast<AttributeDomain>(storage.domain);
+ const eCustomDataType data_type = static_cast<eCustomDataType>(storage.data_type);
+ const eAttrDomain domain = static_cast<eAttrDomain>(storage.domain);
GField field = get_input_attribute_field(params, data_type);
diff --git a/source/blender/nodes/geometry/nodes/node_geo_viewer.cc b/source/blender/nodes/geometry/nodes/node_geo_viewer.cc
index 8e9d7b0e46d..6979693e215 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_viewer.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_viewer.cc
@@ -39,7 +39,7 @@ static void node_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
uiItemR(layout, ptr, "data_type", 0, "", ICON_NONE);
}
-static eNodeSocketDatatype custom_data_type_to_socket_type(const CustomDataType type)
+static eNodeSocketDatatype custom_data_type_to_socket_type(const eCustomDataType type)
{
switch (type) {
case CD_PROP_FLOAT:
@@ -61,7 +61,7 @@ static eNodeSocketDatatype custom_data_type_to_socket_type(const CustomDataType
static void node_update(bNodeTree *ntree, bNode *node)
{
const NodeGeometryViewer &storage = node_storage(*node);
- const CustomDataType data_type = static_cast<CustomDataType>(storage.data_type);
+ const eCustomDataType data_type = static_cast<eCustomDataType>(storage.data_type);
const eNodeSocketDatatype socket_type = custom_data_type_to_socket_type(data_type);
LISTBASE_FOREACH (bNodeSocket *, socket, &node->inputs) {
@@ -82,7 +82,7 @@ static void node_gather_link_searches(GatherLinkSearchOpParams &params)
ED_spreadsheet_context_paths_set_geometry_node(bmain, snode, &viewer_node);
};
- const std::optional<CustomDataType> type = node_socket_to_custom_data_type(
+ const std::optional<eCustomDataType> type = node_socket_to_custom_data_type(
params.other_socket());
if (params.in_out() == SOCK_OUT) {
/* The viewer node only has inputs. */
diff --git a/source/blender/nodes/intern/geometry_nodes_eval_log.cc b/source/blender/nodes/intern/geometry_nodes_eval_log.cc
index 9a316190720..85dfdf03b82 100644
--- a/source/blender/nodes/intern/geometry_nodes_eval_log.cc
+++ b/source/blender/nodes/intern/geometry_nodes_eval_log.cc
@@ -495,7 +495,7 @@ void LocalGeoLogger::log_execution_time(DNode node, std::chrono::microseconds ex
void LocalGeoLogger::log_used_named_attribute(DNode node,
std::string attribute_name,
- NamedAttributeUsage usage)
+ eNamedAttrUsage usage)
{
used_named_attributes_.append({node, {std::move(attribute_name), usage}});
}
diff --git a/source/blender/nodes/intern/node_geometry_exec.cc b/source/blender/nodes/intern/node_geometry_exec.cc
index 9aee3ddcce7..27ad12ba252 100644
--- a/source/blender/nodes/intern/node_geometry_exec.cc
+++ b/source/blender/nodes/intern/node_geometry_exec.cc
@@ -24,7 +24,7 @@ void GeoNodeExecParams::error_message_add(const NodeWarningType type, std::strin
}
void GeoNodeExecParams::used_named_attribute(std::string attribute_name,
- const NamedAttributeUsage usage)
+ const eNamedAttrUsage usage)
{
if (provider_->logger == nullptr) {
return;
@@ -112,8 +112,8 @@ const bNodeSocket *GeoNodeExecParams::find_available_socket(const StringRef name
GVArray GeoNodeExecParams::get_input_attribute(const StringRef name,
const GeometryComponent &component,
- const AttributeDomain domain,
- const CustomDataType type,
+ const eAttrDomain domain,
+ const eCustomDataType type,
const void *default_value) const
{
const bNodeSocket *found_socket = this->find_available_socket(name);
@@ -176,10 +176,10 @@ GVArray GeoNodeExecParams::get_input_attribute(const StringRef name,
return GVArray::ForSingle(*cpp_type, domain_num, default_value);
}
-CustomDataType GeoNodeExecParams::get_input_attribute_data_type(
+eCustomDataType GeoNodeExecParams::get_input_attribute_data_type(
const StringRef name,
const GeometryComponent &component,
- const CustomDataType default_type) const
+ const eCustomDataType default_type) const
{
const bNodeSocket *found_socket = this->find_available_socket(name);
BLI_assert(found_socket != nullptr); /* There should always be available socket for the name. */
@@ -212,12 +212,12 @@ CustomDataType GeoNodeExecParams::get_input_attribute_data_type(
return default_type;
}
-AttributeDomain GeoNodeExecParams::get_highest_priority_input_domain(
+eAttrDomain GeoNodeExecParams::get_highest_priority_input_domain(
Span<std::string> names,
const GeometryComponent &component,
- const AttributeDomain default_domain) const
+ const eAttrDomain default_domain) const
{
- Vector<AttributeDomain, 8> input_domains;
+ Vector<eAttrDomain, 8> input_domains;
for (const std::string &name : names) {
const bNodeSocket *found_socket = this->find_available_socket(name);
BLI_assert(found_socket != nullptr); /* A socket should be available socket for the name. */
diff --git a/source/blender/nodes/shader/nodes/node_shader_map_range.cc b/source/blender/nodes/shader/nodes/node_shader_map_range.cc
index a487e07bd5a..5fc69987c67 100644
--- a/source/blender/nodes/shader/nodes/node_shader_map_range.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_map_range.cc
@@ -53,7 +53,7 @@ static void node_shader_buts_map_range(uiLayout *layout, bContext *UNUSED(C), Po
static int node_shader_map_range_ui_class(const bNode *node)
{
const NodeMapRange &storage = node_storage(*node);
- const CustomDataType data_type = static_cast<CustomDataType>(storage.data_type);
+ const eCustomDataType data_type = static_cast<eCustomDataType>(storage.data_type);
if (data_type == CD_PROP_FLOAT3) {
return NODE_CLASS_OP_VECTOR;
}
@@ -63,7 +63,7 @@ static int node_shader_map_range_ui_class(const bNode *node)
static void node_shader_update_map_range(bNodeTree *ntree, bNode *node)
{
const NodeMapRange &storage = node_storage(*node);
- const CustomDataType data_type = static_cast<CustomDataType>(storage.data_type);
+ const eCustomDataType data_type = static_cast<eCustomDataType>(storage.data_type);
const int type = (data_type == CD_PROP_FLOAT) ? SOCK_FLOAT : SOCK_VECTOR;
Array<bool> new_input_availability(BLI_listbase_count(&node->inputs));
@@ -108,7 +108,7 @@ static void node_shader_init_map_range(bNodeTree *UNUSED(ntree), bNode *node)
class SocketSearchOp {
public:
std::string socket_name;
- CustomDataType data_type;
+ eCustomDataType data_type;
int interpolation_type = NODE_MAP_RANGE_LINEAR;
void operator()(LinkSearchOpParams &params)
@@ -120,7 +120,7 @@ class SocketSearchOp {
}
};
-static std::optional<CustomDataType> node_type_from_other_socket(const bNodeSocket &socket)
+static std::optional<eCustomDataType> node_type_from_other_socket(const bNodeSocket &socket)
{
switch (socket.type) {
case SOCK_FLOAT:
@@ -137,7 +137,7 @@ static std::optional<CustomDataType> node_type_from_other_socket(const bNodeSock
static void node_map_range_gather_link_searches(GatherLinkSearchOpParams &params)
{
- const std::optional<CustomDataType> type = node_type_from_other_socket(params.other_socket());
+ const std::optional<eCustomDataType> type = node_type_from_other_socket(params.other_socket());
if (!type) {
return;
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_uvmap.cc b/source/blender/nodes/shader/nodes/node_shader_uvmap.cc
index 91d89952da7..53228f0a314 100644
--- a/source/blender/nodes/shader/nodes/node_shader_uvmap.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_uvmap.cc
@@ -46,7 +46,7 @@ static int node_shader_gpu_uvmap(GPUMaterial *mat,
NodeShaderUVMap *attr = static_cast<NodeShaderUVMap *>(node->storage);
/* NOTE: using CD_AUTO_FROM_NAME instead of CD_MTFACE as geometry nodes may overwrite data which
- * will also change the CustomDataType. This will also make EEVEE and Cycles consistent. See
+ * will also change the eCustomDataType. This will also make EEVEE and Cycles consistent. See
* T93179. */
GPUNodeLink *mtface = GPU_attribute(mat, CD_AUTO_FROM_NAME, attr->uv_map);
diff --git a/source/blender/nodes/shader/nodes/node_shader_vertex_color.cc b/source/blender/nodes/shader/nodes/node_shader_vertex_color.cc
index cba944c671c..830f02d8df1 100644
--- a/source/blender/nodes/shader/nodes/node_shader_vertex_color.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_vertex_color.cc
@@ -43,7 +43,7 @@ static int node_shader_gpu_vertex_color(GPUMaterial *mat,
{
NodeShaderVertexColor *vertexColor = (NodeShaderVertexColor *)node->storage;
/* NOTE: using CD_AUTO_FROM_NAME instead of CD_MCOL or CD_PROP_COLOR for named attributes
- * as geometry nodes may overwrite data which will also change the CustomDataType.
+ * as geometry nodes may overwrite data which will also change the eCustomDataType.
* This will also make EEVEE and Cycles
* consistent. See T93179. */