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>2020-12-18 18:00:45 +0300
committerJacques Lucke <jacques@blender.org>2020-12-18 18:02:23 +0300
commit3deb21055ad16618b80297b7a82bca46b7b9c1f9 (patch)
tree9fa16b08fae7acf764386b1a4e5c4809c53e1684 /source/blender/nodes/geometry/node_geometry_util.hh
parent1be465cccbf96c64e5a90962bd2c76cbc7675fb0 (diff)
Geometry Nodes: support randomly picking instances from collection
This uses the "id" attribute to randomly pick instances from a collection for each point. There is one issue. When the collection is updated (e.g. when an object is added to it), the nodes modifier is not automatically updated. It seems like we don't have the infrastructure to support this dependency yet. The same issue exists in the Boolean modifier and with collision collections. This should be solved separately soonish. When "Whole Collection" is disabled, one direct child of the input collection is instanced at each point. A direct child can be an object or a collection. Currently, all objects are picked approximately equally often. In the future, we will provide more control over which point gets which instance. Differential Revision: https://developer.blender.org/D9884 Ref T82372.
Diffstat (limited to 'source/blender/nodes/geometry/node_geometry_util.hh')
-rw-r--r--source/blender/nodes/geometry/node_geometry_util.hh3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/nodes/geometry/node_geometry_util.hh b/source/blender/nodes/geometry/node_geometry_util.hh
index 3102690d2ed..7c12611a898 100644
--- a/source/blender/nodes/geometry/node_geometry_util.hh
+++ b/source/blender/nodes/geometry/node_geometry_util.hh
@@ -50,4 +50,7 @@ void poisson_disk_point_elimination(Vector<float3> const *input_points,
float maximum_distance,
float3 boundbox);
+Array<uint32_t> get_geometry_element_ids_as_uints(const GeometryComponent &component,
+ const AttributeDomain domain);
+
} // namespace blender::nodes