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:
authorJacques Lucke <jacques@blender.org>2021-09-23 18:59:14 +0300
committerJacques Lucke <jacques@blender.org>2021-09-23 18:59:44 +0300
commit502543e46b0c3ccc92db7161b899442f6d7a10f9 (patch)
tree49c5915ee9a220167fc2cdce3a307d64248d2a1c /source/blender/nodes/intern
parent38af29df5c307517dfdd0803b7e00d979be7185d (diff)
Geometry Nodes: remove old method to iterate over attributes
The previous commit added a new method to the same in a better way.
Diffstat (limited to 'source/blender/nodes/intern')
-rw-r--r--source/blender/nodes/intern/geometry_nodes_eval_log.cc19
1 files changed, 13 insertions, 6 deletions
diff --git a/source/blender/nodes/intern/geometry_nodes_eval_log.cc b/source/blender/nodes/intern/geometry_nodes_eval_log.cc
index 3b3b643d0ae..fa9bf09d8d9 100644
--- a/source/blender/nodes/intern/geometry_nodes_eval_log.cc
+++ b/source/blender/nodes/intern/geometry_nodes_eval_log.cc
@@ -159,15 +159,22 @@ const SocketLog *NodeLog::lookup_socket_log(const bNode &node, const bNodeSocket
GeometryValueLog::GeometryValueLog(const GeometrySet &geometry_set, bool log_full_geometry)
{
- bke::geometry_set_instances_attribute_foreach(
- geometry_set,
- [&](const bke::AttributeIDRef &attribute_id, const AttributeMetaData &meta_data) {
+ static std::array all_component_types = {GEO_COMPONENT_TYPE_CURVE,
+ GEO_COMPONENT_TYPE_INSTANCES,
+ GEO_COMPONENT_TYPE_MESH,
+ GEO_COMPONENT_TYPE_POINT_CLOUD,
+ GEO_COMPONENT_TYPE_VOLUME};
+ geometry_set.attribute_foreach(
+ all_component_types,
+ true,
+ [&](const bke::AttributeIDRef &attribute_id,
+ const AttributeMetaData &meta_data,
+ const GeometryComponent &UNUSED(component)) {
if (attribute_id.is_named()) {
this->attributes_.append({attribute_id.name(), meta_data.domain, meta_data.data_type});
}
- return true;
- },
- 8);
+ });
+
for (const GeometryComponent *component : geometry_set.get_components_for_read()) {
component_types_.append(component->type());
switch (component->type()) {