System Information
Operating system: Windows 10
Graphics card: 3090 / 3060 / 1050ti
Blender Version
Broken: (Current Builds) (3.0.0 hash: fafd21b14c23, master, 2021-07-22)
Worked: (2.93.1 hash: d6b1d35bf874, master, 2021-07-12)
Caused by rB3b6ee8cee708: Refactor: Move vertex group names to object data
Short description of error
Data copy is deleting vgroup data in 3.0 builds since the 12th.
Exact steps for others to reproduce the error
Running this script deletes the vertex group which began happening in 3.0 builds after the 12th.
import bpy # all vertices belong to a single group context = bpy.context obj = context.object #get evaluated object obj_eval = obj.evaluated_get(context.evaluated_depsgraph_get()) print(obj_eval.vertex_groups[:]) #the evaluated object has groups # and create new mesh from it new_mesh = bpy.data.meshes.new_from_object(obj_eval) print(new_mesh.vertices[0].groups[0].weight) # created mesh has groups and weight # assign new mesh to the object obj.data = new_mesh print(obj.vertex_groups[:]) #vertex groups are gone
this example might be more linear
import bpy context = bpy.context obj = context.object print(obj.vertex_groups[:]) # this piece used to preserve vertex groups but it doesn't obj.data = bpy.data.meshes.new_from_object(obj) print(obj.vertex_groups[:])
This is what happens in current 3.0 builds.
This is what was happening in 2.93.1LTS and 3.0.0 on the 12th and prior.
Vgroup data was also part of the copy which was expected behavior. The removal of the data is the issue attempting to be outlined.