Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_blur_attribute.cc
| /* SPDX-License-Identifier: GPL-2.0-or-later */ | /* SPDX-License-Identifier: GPL-2.0-or-later */ | ||||
| #include "BLI_array.hh" | #include "BLI_array.hh" | ||||
| #include "BLI_generic_array.hh" | #include "BLI_generic_array.hh" | ||||
| #include "BLI_index_mask.hh" | #include "BLI_index_mask.hh" | ||||
| #include "BLI_index_range.hh" | #include "BLI_index_range.hh" | ||||
| #include "BLI_span.hh" | #include "BLI_span.hh" | ||||
| #include "BLI_task.hh" | #include "BLI_task.hh" | ||||
| #include "BLI_vector.hh" | #include "BLI_vector.hh" | ||||
| #include "BLI_virtual_array.hh" | #include "BLI_virtual_array.hh" | ||||
| #include "DNA_mesh_types.h" | #include "DNA_mesh_types.h" | ||||
| #include "DNA_meshdata_types.h" | #include "DNA_meshdata_types.h" | ||||
| #include "BKE_attribute_math.hh" | #include "BKE_attribute_math.hh" | ||||
| #include "BKE_curves.hh" | #include "BKE_curves.hh" | ||||
| #include "BKE_geometry_fields.hh" | |||||
| #include "BKE_mesh.h" | #include "BKE_mesh.h" | ||||
| #include "BKE_mesh_mapping.h" | #include "BKE_mesh_mapping.h" | ||||
| #include "UI_interface.h" | #include "UI_interface.h" | ||||
| #include "UI_resources.h" | #include "UI_resources.h" | ||||
| #include "NOD_socket_search_link.hh" | #include "NOD_socket_search_link.hh" | ||||
| ▲ Show 20 Lines • Show All 413 Lines • ▼ Show 20 Lines | public: | ||||
| { | { | ||||
| if (const BlurAttributeFieldInput *other_blur = dynamic_cast<const BlurAttributeFieldInput *>( | if (const BlurAttributeFieldInput *other_blur = dynamic_cast<const BlurAttributeFieldInput *>( | ||||
| &other)) { | &other)) { | ||||
| return weight_field_ == other_blur->weight_field_ && | return weight_field_ == other_blur->weight_field_ && | ||||
| value_field_ == other_blur->value_field_ && iterations_ == other_blur->iterations_; | value_field_ == other_blur->value_field_ && iterations_ == other_blur->iterations_; | ||||
| } | } | ||||
| return false; | return false; | ||||
| } | } | ||||
| std::optional<eAttrDomain> preferred_domain(const GeometryComponent &component) const override | |||||
| { | |||||
| return bke::try_detect_field_domain(component, value_field_); | |||||
| } | |||||
| }; | }; | ||||
| static StringRefNull identifier_suffix(eCustomDataType data_type) | static StringRefNull identifier_suffix(eCustomDataType data_type) | ||||
| { | { | ||||
| switch (data_type) { | switch (data_type) { | ||||
| case CD_PROP_FLOAT: | case CD_PROP_FLOAT: | ||||
| return "Float"; | return "Float"; | ||||
| case CD_PROP_INT32: | case CD_PROP_INT32: | ||||
| ▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines | |||||