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-09-21 22:20:54 +0300
committerHans Goudey <h.goudey@me.com>2021-09-21 22:20:54 +0300
commit6d162d35e2c85ea4fb990f0c459ec36064cf0550 (patch)
treea0e5f89fdfedf77eb21439438760b2cffb7ba94f /source/blender/blenkernel/BKE_geometry_set.hh
parent29e3545194804428676b0adf881f418a96a40a9a (diff)
Geometry Nodes: Fill instances separately in the curve fill node
With this commit, each referenced instance data will be converted to a geometry instances and processed separately. This should result in a large speedup when the instances component has many insances referring to the same data. This change can act as a blueprint for other nodes that need to implement similar behavior. It adds some helper functions on the instances component to make that easier. Thanks to Erik Abrahamsson for a proof of concept patch. Differential Revision: https://developer.blender.org/D12572
Diffstat (limited to 'source/blender/blenkernel/BKE_geometry_set.hh')
-rw-r--r--source/blender/blenkernel/BKE_geometry_set.hh4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_geometry_set.hh b/source/blender/blenkernel/BKE_geometry_set.hh
index 98f5de43f84..317d513dae6 100644
--- a/source/blender/blenkernel/BKE_geometry_set.hh
+++ b/source/blender/blenkernel/BKE_geometry_set.hh
@@ -580,6 +580,9 @@ class InstancesComponent : public GeometryComponent {
blender::Span<InstanceReference> references() const;
+ void ensure_geometry_instances();
+ GeometrySet &geometry_set_from_reference(const int reference_index);
+
blender::Span<int> instance_reference_handles() const;
blender::MutableSpan<int> instance_reference_handles();
blender::MutableSpan<blender::float4x4> instance_transforms();
@@ -588,6 +591,7 @@ class InstancesComponent : public GeometryComponent {
blender::Span<int> instance_ids() const;
int instances_amount() const;
+ int references_amount() const;
blender::Span<int> almost_unique_ids() const;