Fix bug where existing meshes were not deleted when switching representations.

This commit is contained in:
Dion Moult
2021-11-05 17:57:05 +11:00
parent 07bee4acfa
commit 3e52d93db0
5 changed files with 46 additions and 4 deletions
@@ -52,6 +52,11 @@ class Geometry(blenderbim.core.tool.Geometry):
modifier.solver = "EXACT"
modifier.use_self = True
@classmethod
def delete_data(cls, data):
bpy.data.meshes.remove(data)
@classmethod
def does_object_have_mesh_with_faces(cls, obj):
return bool(isinstance(obj.data, bpy.types.Mesh) and len(obj.data.polygons))