Fixed bug in tool.Blender.get_bmesh_for_mesh

It caused errors because it was expecting mesh object to be selected - when it's not necessary that active_object is the one that mesh belongs to and sometimes no objects can be selected at all.
This commit is contained in:
Andrej730
2023-04-01 12:12:34 +05:00
parent b6598f09a3
commit f053ba714f
+1 -1
View File
@@ -208,7 +208,7 @@ class Blender:
def get_bmesh_for_mesh(cls, mesh, clean=False):
import bmesh
if bpy.context.object.mode == "EDIT":
if mesh.is_editmode:
bm = bmesh.from_edit_mesh(mesh)
if clean:
bm.clear()