diff options
author | Hans Goudey <h.goudey@me.com> | 2021-12-29 20:31:58 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-12-29 20:31:58 +0300 |
commit | a94d80716e688aaa5350b63bd49a952fb1fbca97 (patch) | |
tree | f2ae7b0113d38546b029a9cc66bd6b8da1a7f560 /source/blender/blenkernel/BKE_geometry_set.hh | |
parent | a836ded9902d67359ea94a03c45de7edd4f826fb (diff) |
Geometry Nodes: Support instances in the delete geometry node
Ever since the instance domain was added, this was exposed, it just
didn't do anything. This patch implements the instances domain in the
delete and separate geometry nodes, where it acts on the top-level
instances.
We act on a mutable instances input, with the idea that eventually
copy on write attribute layers will make this less expensive. It also
allows us to keep the instance references in place and to do less
work in some situations.
Ref T93554
Differential Revision: https://developer.blender.org/D13565
Diffstat (limited to 'source/blender/blenkernel/BKE_geometry_set.hh')
-rw-r--r-- | source/blender/blenkernel/BKE_geometry_set.hh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_geometry_set.hh b/source/blender/blenkernel/BKE_geometry_set.hh index 8e36bda84ce..0f9c2c1062b 100644 --- a/source/blender/blenkernel/BKE_geometry_set.hh +++ b/source/blender/blenkernel/BKE_geometry_set.hh @@ -922,6 +922,11 @@ class InstancesComponent : public GeometryComponent { int instances_amount() const; int references_amount() const; + /** + * Remove the indices in the selection mask and remove unused instance references afterwards. + */ + void remove_instances(const blender::IndexMask selection); + blender::Span<int> almost_unique_ids() const; blender::bke::CustomDataAttributes &attributes(); |