Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import bpy
- prefix = "Remove_This_Word_From_Bones"
- # Find the armature in the scene
- armature = None
- for obj in bpy.data.objects:
- if obj.type == 'ARMATURE':
- armature = obj
- break
- if armature is None:
- print("No armature found.")
- else:
- print("=== Renaming Bones in:", armature.name, "===")
- for bone in armature.data.bones:
- old = bone.name
- if old.startswith(prefix):
- new = old[len(prefix):] # remove the prefix
- bone.name = new
- print(f"{old} --> {new}")
- print("=== Done ===")
Advertisement
Add Comment
Please, Sign In to add comment