Is there a way to make multiple objects become convex hulls using python and applying the operator to all selected objects?
Asked
Active
Viewed 1,155 times
1 Answers
1
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
meshes = set(o.data for o in context.selected_objects if o.type == 'MESH')
bm = bmesh.new()
for me in meshes:
bm.from_mesh(me)
bmesh.ops.convex_hull(bm, input=bm.verts)
bm.to_mesh(me)
me.update()
bm.clear()
batFINGER
- 84,216
- 10
- 108
- 233