From f2d70c02f88cc00266d330d89ea916e26c0ecf44 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Sun, 25 Apr 2021 21:41:59 -0500 Subject: Fix (unreported): Geometry nodes instance ids not copied or cleared Though to my knowledge we haven't had a report about this yet, this looks like a clear oversight-- the ids are just more data stored by the instances component, and should be cleared and copied like other data. This might have resulted in incorrect random IDs for instances in renderers in some cases where the component had to be copied. --- source/blender/blenkernel/intern/geometry_component_instances.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender') diff --git a/source/blender/blenkernel/intern/geometry_component_instances.cc b/source/blender/blenkernel/intern/geometry_component_instances.cc index 11526eda762..feb30e8575a 100644 --- a/source/blender/blenkernel/intern/geometry_component_instances.cc +++ b/source/blender/blenkernel/intern/geometry_component_instances.cc @@ -44,6 +44,7 @@ GeometryComponent *InstancesComponent::copy() const InstancesComponent *new_component = new InstancesComponent(); new_component->transforms_ = transforms_; new_component->instanced_data_ = instanced_data_; + new_component->ids_ = ids_; return new_component; } @@ -51,6 +52,7 @@ void InstancesComponent::clear() { instanced_data_.clear(); transforms_.clear(); + ids_.clear(); } void InstancesComponent::add_instance(Object *object, float4x4 transform, const int id) -- cgit v1.2.3