Advertisement
Guest User

Untitled

a guest
Jul 9th, 2024
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. import bpy
  2.  
  3. objs = bpy.context.selected_objects
  4.  
  5. # first make sure everything is deselected
  6. bpy.ops.object.select_all(action="DESELECT")
  7.  
  8. for obj in objs:
  9.     # set the object to be selected and the active object
  10.     obj.select_set(True)
  11.     bpy.context.view_layer.objects.active = obj
  12.    
  13.     # do the thing here
  14.     bpy.ops.object.convert(target='MESH')
  15.  
  16.     # then deselect once done
  17.     obj.select_set(False)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement