Closed nagadomi closed 5 years ago
Thanks for the updates, I'll try it in the future. :smile:
Not sure if the following 2 lines are the same or not: :thinking:
return obj.evaluated_get(depsgraph).to_mesh(depsgraph=depsgraph, preserve_all_data_layers=True)
return obj.to_mesh(depsgraph=depsgraph, preserve_all_data_layers=True)
Without evaluated_get, modifiers(e.g. Mirror Modifier) are not applied.
This PR does not need to be merged immediately.
When a mesh has modifiers (e.g. Bevel modifier), vertex weights are not exported correctly. The mesh returned from
obj.evaluated_get(bpy.context.evaluated_depsgraph_get()).to_mesh()
seems to have lost vertex groups when the mesh has modifiers.related: https://developer.blender.org/T65544 https://developer.blender.org/rB5dbda33462349a4ac78f08e8ed4ec7922ca7394f
I am not very confident about this change, but it seems to work in latest master branch of Blender.