Skip to content
Snippets Groups Projects
Commit b4bcc94a authored by Brecht Van Lommel's avatar Brecht Van Lommel
Browse files

Fix #35231: f2 addon not working for converting adjacent faces into a single

ngon. Now just let the make face operator try it instead of trying to decide
when to do this.
parent ff76aab7
No related branches found
No related tags found
No related merge requests found
...@@ -249,15 +249,11 @@ class MeshF2(bpy.types.Operator): ...@@ -249,15 +249,11 @@ class MeshF2(bpy.types.Operator):
bm = bmesh.from_edit_mesh(context.active_object.data) bm = bmesh.from_edit_mesh(context.active_object.data)
sel = [v for v in bm.verts if v.select] sel = [v for v in bm.verts if v.select]
if len(sel) > 2: if len(sel) > 2:
if len(bm.faces) > 0:
if len([True for f in bm.faces if f.select]) == len(bm.faces):
# all faces selected, can't create new one
return {'CANCELLED'}
# original 'Make Edge/Face' behaviour # original 'Make Edge/Face' behaviour
try: try:
bpy.ops.mesh.edge_face_add('INVOKE_DEFAULT') bpy.ops.mesh.edge_face_add('INVOKE_DEFAULT')
except: except:
pass return {'CANCELLED'}
elif len(sel) == 1: elif len(sel) == 1:
# single vertex selected -> mirror vertex and create new face # single vertex selected -> mirror vertex and create new face
quad_from_vertex(bm, sel[0], context, event) quad_from_vertex(bm, sel[0], context, event)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment