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:
authorJacques Lucke <jacques@blender.org>2021-02-16 15:35:06 +0300
committerJacques Lucke <jacques@blender.org>2021-02-16 15:35:06 +0300
commit1ec30d4b15684df333926aae78516b07dab428ad (patch)
treee3220779287cd18eeee11eb07dba20b6aa11e1dd /source/blender/nodes
parent5688f791f51827d77f4479bee90c4e88add72ce6 (diff)
Fix T85697: subdivision surface node output does not contain vertex group names
The vertex weights were actually interpolated correctly. The issue was that vertex group names were removed from the output geometry set. We have to keep track of these names separately from the mesh, for legacy reasons. Vertex group names are not stored on meshes but objects instead.
Diffstat (limited to 'source/blender/nodes')
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_subdivision_surface.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_subdivision_surface.cc b/source/blender/nodes/geometry/nodes/node_geo_subdivision_surface.cc
index 4cdb669f964..47304a0de68 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_subdivision_surface.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_subdivision_surface.cc
@@ -109,7 +109,8 @@ static void geo_node_subdivision_surface_exec(GeoNodeExecParams params)
Mesh *mesh_out = BKE_subdiv_to_mesh(subdiv, &mesh_settings, mesh_in);
BKE_mesh_calc_normals(mesh_out);
- geometry_set.replace_mesh(mesh_out);
+ MeshComponent &mesh_component = geometry_set.get_component_for_write<MeshComponent>();
+ mesh_component.replace_mesh_but_keep_vertex_group_names(mesh_out);
// BKE_subdiv_stats_print(&subdiv->stats);
BKE_subdiv_free(subdiv);