[Bf-blender-cvs] [1ec30d4b156] master: Fix T85697: subdivision surface node output does not contain vertex group names

Jacques Lucke noreply at git.blender.org
Tue Feb 16 13:48:31 CET 2021


Commit: 1ec30d4b15684df333926aae78516b07dab428ad
Author: Jacques Lucke
Date:   Tue Feb 16 13:35:06 2021 +0100
Branches: master
https://developer.blender.org/rB1ec30d4b15684df333926aae78516b07dab428ad

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.

===================================================================

M	source/blender/nodes/geometry/nodes/node_geo_subdivision_surface.cc

===================================================================

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);



More information about the Bf-blender-cvs mailing list