[Bf-blender-cvs] [af6f3a4020f] master: Cleanup: Remove unused function

Hans Goudey noreply at git.blender.org
Mon Jul 4 15:50:41 CEST 2022


Commit: af6f3a4020fc09cc45d69abb15a8a611ce6771ac
Author: Hans Goudey
Date:   Mon Jul 4 08:50:33 2022 -0500
Branches: master
https://developer.blender.org/rBaf6f3a4020fc09cc45d69abb15a8a611ce6771ac

Cleanup: Remove unused function

===================================================================

M	source/blender/blenkernel/BKE_geometry_set_instances.hh
M	source/blender/blenkernel/intern/geometry_set_instances.cc

===================================================================

diff --git a/source/blender/blenkernel/BKE_geometry_set_instances.hh b/source/blender/blenkernel/BKE_geometry_set_instances.hh
index dd4cfd69cb1..6d4b9a2128c 100644
--- a/source/blender/blenkernel/BKE_geometry_set_instances.hh
+++ b/source/blender/blenkernel/BKE_geometry_set_instances.hh
@@ -43,15 +43,4 @@ struct GeometryInstanceGroup {
 void geometry_set_gather_instances(const GeometrySet &geometry_set,
                                    Vector<GeometryInstanceGroup> &r_instance_groups);
 
-/**
- * Add information about all the attributes on every component of the type. The resulting info
- * will contain the highest complexity data type and the highest priority domain among every
- * attribute with the given name on all of the input components.
- */
-void geometry_set_gather_instances_attribute_info(
-    Span<GeometryInstanceGroup> set_groups,
-    Span<GeometryComponentType> component_types,
-    const Set<std::string> &ignored_attributes,
-    Map<AttributeIDRef, AttributeKind> &r_attributes);
-
 }  // namespace blender::bke
diff --git a/source/blender/blenkernel/intern/geometry_set_instances.cc b/source/blender/blenkernel/intern/geometry_set_instances.cc
index 6b260207995..fbd676e4bee 100644
--- a/source/blender/blenkernel/intern/geometry_set_instances.cc
+++ b/source/blender/blenkernel/intern/geometry_set_instances.cc
@@ -157,41 +157,6 @@ void geometry_set_gather_instances(const GeometrySet &geometry_set,
   geometry_set_collect_recursive(geometry_set, float4x4::identity(), r_instance_groups);
 }
 
-void geometry_set_gather_instances_attribute_info(Span<GeometryInstanceGroup> set_groups,
-                                                  Span<GeometryComponentType> component_types,
-                                                  const Set<std::string> &ignored_attributes,
-                                                  Map<AttributeIDRef, AttributeKind> &r_attributes)
-{
-  for (const GeometryInstanceGroup &set_group : set_groups) {
-    const GeometrySet &set = set_group.geometry_set;
-    for (const GeometryComponentType component_type : component_types) {
-      if (!set.has(component_type)) {
-        continue;
-      }
-      const GeometryComponent &component = *set.get_component_for_read(component_type);
-
-      component.attribute_foreach(
-          [&](const AttributeIDRef &attribute_id, const AttributeMetaData &meta_data) {
-            if (attribute_id.is_named() && ignored_attributes.contains(attribute_id.name())) {
-              return true;
-            }
-            auto add_info = [&](AttributeKind *attribute_kind) {
-              attribute_kind->domain = meta_data.domain;
-              attribute_kind->data_type = meta_data.data_type;
-            };
-            auto modify_info = [&](AttributeKind *attribute_kind) {
-              attribute_kind->domain = meta_data.domain; /* TODO: Use highest priority domain. */
-              attribute_kind->data_type = bke::attribute_data_type_highest_complexity(
-                  {attribute_kind->data_type, meta_data.data_type});
-            };
-
-            r_attributes.add_or_modify(attribute_id, add_info, modify_info);
-            return true;
-          });
-    }
-  }
-}
-
 }  // namespace blender::bke
 
 void InstancesComponent::foreach_referenced_geometry(



More information about the Bf-blender-cvs mailing list