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:
Diffstat (limited to 'source/blender/blenkernel/BKE_geometry_set.hh')
-rw-r--r--source/blender/blenkernel/BKE_geometry_set.hh19
1 files changed, 19 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_geometry_set.hh b/source/blender/blenkernel/BKE_geometry_set.hh
index 317d513dae6..a6c77c74b9e 100644
--- a/source/blender/blenkernel/BKE_geometry_set.hh
+++ b/source/blender/blenkernel/BKE_geometry_set.hh
@@ -25,6 +25,7 @@
#include "BLI_float3.hh"
#include "BLI_float4x4.hh"
+#include "BLI_function_ref.hh"
#include "BLI_hash.hh"
#include "BLI_map.hh"
#include "BLI_set.hh"
@@ -293,6 +294,21 @@ struct GeometrySet {
bool owns_direct_data() const;
void ensure_owns_direct_data();
+ using AttributeForeachCallback =
+ blender::FunctionRef<void(const blender::bke::AttributeIDRef &attribute_id,
+ const AttributeMetaData &meta_data,
+ const GeometryComponent &component)>;
+
+ void attribute_foreach(blender::Span<GeometryComponentType> component_types,
+ bool include_instances,
+ AttributeForeachCallback callback) const;
+
+ void gather_attributes_for_propagation(
+ blender::Span<GeometryComponentType> component_types,
+ GeometryComponentType dst_component_type,
+ bool include_instances,
+ blender::Map<blender::bke::AttributeIDRef, AttributeKind> &r_attributes) const;
+
/* Utility methods for creation. */
static GeometrySet create_with_mesh(
Mesh *mesh, GeometryOwnershipType ownership = GeometryOwnershipType::Owned);
@@ -597,6 +613,9 @@ class InstancesComponent : public GeometryComponent {
int attribute_domain_size(const AttributeDomain domain) const final;
+ void foreach_referenced_geometry(
+ blender::FunctionRef<void(const GeometrySet &geometry_set)> callback) const;
+
bool is_empty() const final;
bool owns_direct_data() const override;