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:
authorHans Goudey <h.goudey@me.com>2021-04-08 20:19:09 +0300
committerHans Goudey <h.goudey@me.com>2021-04-08 20:19:09 +0300
commit1ec9ac201652be6031379e39e98e7dd9dc4a2375 (patch)
tree880f6c342a8bb6f7dd4fdb7f5fbf611790c9fab1 /source/blender/blenkernel/BKE_geometry_set_instances.hh
parentfd414b49068c011a1fd63a304ea95bbe420d6570 (diff)
Geometry Nodes: Support instances in attribute search
Previously only attributes of "real" geometry were displayed in attribute search. This commit adds code to look through attributes on instances and add those to the search drop-down too. This required implementing the same sort of recursive traversal as the realize instances code. The situation is a bit different though, this can return early and doesn't need to keep track of transforms. I added a limit so that it doesn't look through the attributes of too many instanced geometry sets. I think this is important, since this isn't a trivial operation and it could potentially happen for every node in a large node tree. Currently the limit is set at 8 geometry sets, which I expect will be enough, since the set of attributes is mostly not very unique anyway. Fixes T86282 Diffrential Revision: https://developer.blender.org/D10919
Diffstat (limited to 'source/blender/blenkernel/BKE_geometry_set_instances.hh')
-rw-r--r--source/blender/blenkernel/BKE_geometry_set_instances.hh4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_geometry_set_instances.hh b/source/blender/blenkernel/BKE_geometry_set_instances.hh
index c0d9c3f74ec..25876296a47 100644
--- a/source/blender/blenkernel/BKE_geometry_set_instances.hh
+++ b/source/blender/blenkernel/BKE_geometry_set_instances.hh
@@ -39,6 +39,10 @@ struct GeometryInstanceGroup {
Vector<float4x4> transforms;
};
+void geometry_set_instances_attribute_foreach(const GeometrySet &geometry_set,
+ const AttributeForeachCallback callback,
+ const int limit);
+
void geometry_set_gather_instances(const GeometrySet &geometry_set,
Vector<GeometryInstanceGroup> &r_instance_groups);