Skip to content

Instantly share code, notes, and snippets.

@iszotic
Created May 18, 2021 01:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iszotic/e85d3c0cbd36186ea01dccb94a715a68 to your computer and use it in GitHub Desktop.
Save iszotic/e85d3c0cbd36186ea01dccb94a715a68 to your computer and use it in GitHub Desktop.
flip bone vertex groups
import bpy
toflip = [
('.R', '._R'),
('.L', '.R'),
('._R', '.L')
]
for pair in toflip:
for vg in bpy.context.object.vertex_groups:
if pair[0] in vg.name:
vg.name = vg.name.replace(*pair)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment