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-01-05 02:07:10 +0300
committerHans Goudey <h.goudey@me.com>2021-01-05 02:07:10 +0300
commit102eff0bd45e9bce2d1e98f7e3c7e91f9d36df15 (patch)
treee398fd92f1a74c24af9f63f582f55c16f8fe6eb0
parentec90dda318564c3a1ec6e3f07141c66c3ae8358a (diff)
Fix T84382: Geometry Nodes: Vertex group attributes are removed
In the report, the geometry is copied because it has two users and the final join node needs to write to it. The join node also happens to remove attributes apparently, because it exposed a mistake in the "copy" method of the `MeshComponent` class. The copy is supposed to be a deep copy, but the vertex group name map was not duplicated. Differential Revision: https://developer.blender.org/D9991
-rw-r--r--source/blender/blenkernel/intern/geometry_set.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/geometry_set.cc b/source/blender/blenkernel/intern/geometry_set.cc
index e6a67b191f8..2a21a60ccc6 100644
--- a/source/blender/blenkernel/intern/geometry_set.cc
+++ b/source/blender/blenkernel/intern/geometry_set.cc
@@ -283,6 +283,7 @@ GeometryComponent *MeshComponent::copy() const
if (mesh_ != nullptr) {
new_component->mesh_ = BKE_mesh_copy_for_eval(mesh_, false);
new_component->ownership_ = GeometryOwnershipType::Owned;
+ new_component->vertex_group_names_ = blender::Map(vertex_group_names_);
}
return new_component;
}