0
$\begingroup$

Is there a way to make multiple objects become convex hulls using python and applying the operator to all selected objects?

$\endgroup$
1
$\begingroup$

Use the bmesh operator

Use the bmesh convex hull operator as outlined here https://blender.stackexchange.com/a/121815/15543

Test script, run in object mode. Turns all selected mesh objects into their convex hull.

import bpy
import bmesh

context = bpy.context

mesh_obs = [o for o in context.selected_objects if o.type == 'MESH']

bm = bmesh.new()
for ob in mesh_obs:
    me = ob.data
    bm.from_mesh(me)
    bmesh.ops.convex_hull(bm, input=bm.verts)
    bm.to_mesh(me)
    me.update()
    bm.clear()
$\endgroup$

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.