From f8dd03d3dd1b2d7f0ade7c209092212098c75cb4 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Wed, 1 Dec 2021 09:27:27 -0500 Subject: 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 --- source/blender/blenkernel/BKE_geometry_set.hh | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'source/blender/blenkernel/BKE_geometry_set.hh') 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 instance_reference_handles_; /** Transformation of the instances. */ blender::Vector 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 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 instance_reference_handles(); blender::MutableSpan instance_transforms(); blender::Span instance_transforms() const; - blender::MutableSpan instance_ids(); - blender::Span instance_ids() const; - - blender::MutableSpan instance_ids_ensure(); - void instance_ids_clear(); int instances_amount() const; int references_amount() const; -- cgit v1.2.3