|
Blender V4.3
|
#include <BKE_attribute_filter.hh>
Inherited by blender::bke::AttributeFilterFromFunc< Fn >, blender::bke::ProcessAllAttributeExceptAnonymous, and blender::nodes::NodeAttributeFilter.
Public Types | |
| enum class | Result { AllowSkip , Process } |
Public Member Functions | |
| virtual | ~AttributeFilter ()=default |
| virtual Result | filter (const StringRef) const |
| bool | allow_skip (const StringRef name) const |
Static Public Member Functions | |
| static const AttributeFilter & | default_filter () |
Many geometry algorithms need to deal with attributes. For example, the Subdivide Curves code has to properly interpolate attributes to the intermediate points. However, sometimes certain attributes are not necessary after the operation anymore, so they can just be skipped for optimization purposes. This is where #AttributeFilter comes in. It allows the caller to specify which attributes should be processed and which should be ignored.
Definition at line 23 of file BKE_attribute_filter.hh.
|
strong |
| Enumerator | |
|---|---|
| AllowSkip | The algorithm is allowed to skip processing the attribute. |
| Process | The attribute should be processed/propagated if at all possible. |
Definition at line 25 of file BKE_attribute_filter.hh.
|
virtualdefault |
|
inline |
Utility to simplify the check for whether some attribute can be skipped.
Definition at line 46 of file BKE_attribute_filter.hh.
References AllowSkip, and filter().
Referenced by blender::geometry::clean_unused_attributes(), blender::nodes::node_geo_attribute_capture_cc::clean_unused_attributes(), blender::bke::copy_attributes_group_to_group(), blender::nodes::node_geo_curves_to_grease_pencil_cc::curve_instances_to_grease_pencil_layers(), blender::geometry::extract_mesh_edges(), blender::geometry::extract_mesh_faces(), blender::geometry::extract_mesh_vertices(), blender::bke::fill_attribute_range_default(), blender::bke::gather_attributes(), blender::bke::gather_attributes(), blender::bke::GeometrySet::gather_attributes_for_propagation(), blender::bke::gather_attributes_group_to_group(), blender::bke::gather_attributes_to_groups(), blender::geometry::gather_attributes_to_propagate(), blender::nodes::LazyFunctionForReduceForeachGeometryElement::handle_generation_items_group(), blender::nodes::node_geo_interpolate_curves_cc::interpolate_curve_attributes(), blender::geometry::merge_layers(), blender::geometry::point_merge_by_distance(), blender::bke::GeometrySet::propagate_attributes_from_layer_to_instances(), blender::nodes::node_geo_extrude_mesh_cc::remove_non_propagated_attributes(), blender::bke::retrieve_attributes_for_transfer(), blender::bke::should_add_attribute_to_mesh(), and blender::nodes::node_geo_dual_mesh_cc::transfer_attributes().
|
inlinestatic |
Definition at line 51 of file BKE_attribute_filter.hh.
References filter().
This function has different implementations in each derived class. By default, all attributes should be processed.
Reimplemented in blender::bke::AttributeFilterFromFunc< Fn >, blender::bke::ProcessAllAttributeExceptAnonymous, and blender::nodes::NodeAttributeFilter.
Definition at line 38 of file BKE_attribute_filter.hh.
References Process.
Referenced by allow_skip(), and default_filter().