diff options
author | Hans Goudey <h.goudey@me.com> | 2021-12-01 17:27:27 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-12-01 17:27:27 +0300 |
commit | f8dd03d3dd1b2d7f0ade7c209092212098c75cb4 (patch) | |
tree | 5d9f9d32f342607063924cefe0b593538d07ba85 /source/blender/blenkernel/BKE_geometry_set.hh | |
parent | fd8418385c2e3b0cc9ff8a254c3f3e408d0565f9 (diff) |
Cleanup: Store instances id attribute with other attributes
Now that we can store any dynamic attribute on the instances component,
we don't need the special case for `id`, it can just be handled by the
generic attribute storage. Mostly this just allows removing a bunch
of redundant code.
I had to add a null check for `update_custom_data_pointers` because
the instances component doesn't have any pointers to inside of
custom data.
Differential Revision: https://developer.blender.org/D13430
Diffstat (limited to 'source/blender/blenkernel/BKE_geometry_set.hh')
-rw-r--r-- | source/blender/blenkernel/BKE_geometry_set.hh | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/source/blender/blenkernel/BKE_geometry_set.hh b/source/blender/blenkernel/BKE_geometry_set.hh index 35e66908d54..ead62827104 100644 --- a/source/blender/blenkernel/BKE_geometry_set.hh +++ b/source/blender/blenkernel/BKE_geometry_set.hh @@ -636,13 +636,6 @@ class InstancesComponent : public GeometryComponent { blender::Vector<int> instance_reference_handles_; /** Transformation of the instances. */ blender::Vector<blender::float4x4> instance_transforms_; - /** - * IDs of the instances. They are used for consistency over multiple frames for things like - * motion blur. Proper stable ID data that actually helps when rendering can only be generated - * in some situations, so this vector is allowed to be empty, in which case the index of each - * instance will be used for the final ID. - */ - blender::Vector<int> instance_ids_; /* These almost unique ids are generated based on `ids_`, which might not contain unique ids at * all. They are *almost* unique, because under certain very unlikely circumstances, they are not @@ -676,11 +669,6 @@ class InstancesComponent : public GeometryComponent { blender::MutableSpan<int> instance_reference_handles(); blender::MutableSpan<blender::float4x4> instance_transforms(); blender::Span<blender::float4x4> instance_transforms() const; - blender::MutableSpan<int> instance_ids(); - blender::Span<int> instance_ids() const; - - blender::MutableSpan<int> instance_ids_ensure(); - void instance_ids_clear(); int instances_amount() const; int references_amount() const; |