acoolrocket

Blender - Delete all unlocked groups for selected/multiple objects

Jun 26th, 2026
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. import bpy
  2.  
  3. # Loop through all currently selected objects
  4. for obj in bpy.context.selected_objects:
  5. # Ensure the object is a mesh
  6. if obj.type == 'MESH':
  7. # Loop through vertex groups backwards to delete safely
  8. for vg in reversed(obj.vertex_groups):
  9. # Check if the group is unlocked
  10. if not vg.lock_weight:
  11. # Remove the unlocked group
  12. obj.vertex_groups.remove(vg)
Advertisement
Add Comment
Please, Sign In to add comment