diff options
author | Hans Goudey <h.goudey@me.com> | 2021-04-26 05:41:59 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-04-26 05:42:14 +0300 |
commit | f2d70c02f88cc00266d330d89ea916e26c0ecf44 (patch) | |
tree | 53c6442c7de964da885fd309b79aaa73f14c9dbb /source/blender | |
parent | db3b6100404219e2a02e8163e511e604ee137828 (diff) |
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.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/geometry_component_instances.cc | 2 |
1 files changed, 2 insertions, 0 deletions
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) |