SHARE
TWEET

Untitled

a guest Aug 18th, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #import blender namespace
  2. import bpy
  3. #get all selected objects
  4. selection_names = bpy.context.selected_objects
  5.  
  6. #loop trough all "selection_names"
  7. for i in selection_names:
  8.     #for every object "i":
  9.     #set active object as "i"
  10.     bpy.context.view_layer.objects.active = i
  11.  
  12.     #go to edit mode of "i"
  13.     bpy.ops.object.editmode_toggle()
  14.     #select all
  15.     bpy.ops.mesh.select_all(action='SELECT')
  16.     #delete all verts
  17.     bpy.ops.mesh.delete(type='VERT')
  18.     #go back to object mode
  19.     bpy.ops.object.editmode_toggle()
  20.     #repeat for next object in "selection_names" till none left
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top