2
$\begingroup$

Why is the bmesh bridge tool so limited? There's no argument to control segments(number_cuts) and no argument to control interpolation.

Am I missing something? I was under the impression the bpy ops use the bmesh ops, but if that's the case, how does the bpy bridge tool, do these things? Are there undocumented arguments for the bmesh ops? I've tried the obvious ones, without luck.

Any pointers would be appreciated!

$\endgroup$
4
$\begingroup$

Rather late but was trying to work this out myself recently and thought this might be useful to anyone who comes across this issue in future. bpy.ops.bridge_edge_loops() functionality can be replicated by calling bmesh.ops.subdivide_edges() after bmesh.ops.bridge_loops()

e.g. to replicate bpy.ops.mesh.bridge_edge_loops(interpolation='LINEAR', smoothness=1, number_cuts=4)

ret = bmesh.ops.bridge_loops(bm, edges=bm.edges)
bmesh.ops.subdivide_edges(
    bm,
    edges=ret['edges'],
    smooth=1.0,
    smooth_fallof='LINEAR',
    cuts=4)
$\endgroup$
1
  • $\begingroup$ Thank you, definitely useful to me! $\endgroup$ – MACHIN3 Sep 7 '20 at 10:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.