mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 23:11:38 +00:00
Get the bmesh directly from the object mesh data.
Yay, no fussing with edit mode. Thanks to _FrnchFrgg_ in #blendercoders for the tip.
This commit is contained in:
parent
ca71034680
commit
5b47c15611
1 changed files with 2 additions and 6 deletions
|
@ -46,12 +46,8 @@ def make_face(bmface, mesh):
|
|||
mesh.vertices[v[2]].co, mat.name, 0, 0, 0, 1, 1)
|
||||
|
||||
def make_brushes(obj):
|
||||
act = bpy.context.scene.objects.active
|
||||
bpy.context.scene.objects.active = obj
|
||||
bpy.ops.object.editmode_toggle()
|
||||
brushmesh = bmesh.from_edit_mesh(obj.data).copy()
|
||||
bpy.ops.object.editmode_toggle()
|
||||
bpy.context.scene.objects.active = act
|
||||
brushmesh = bmesh.new()
|
||||
brushmesh.from_mesh(obj.data)
|
||||
brushes = []
|
||||
face_set = set(brushmesh.faces)
|
||||
while face_set:
|
||||
|
|
Loading…
Reference in a new issue