mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user