iI have a script made for 3dsmax that renamerenames bones in batch like this:
( local nameMap = #( \
dataPair "Bip01_" "",
dataPair "Neck01" "Neck",
dataPair "phy_anchor_Skirt_00" "Pelvis",
And so on and so forth, how. How can iI make the same for blender ?_ Does anybody have something working, so iI can just change the name of the bones, and press run script
:)'Run Script'?
Because as far as iI can do, it only change exact names and not part of the name, this is what iI've got ( import bpy context = bpy.context obj = context.object:
namelist = [("Bip01_", "")]
import bpy
context = bpy.context
obj = context.object
namelist = [("Bip01_", "")]
for name, newname in namelist:
# get the pose bone with name
pb = obj.pose.bones.get(name)
# continue if no bone of that name
if pb is None:
continue
# rename
pb.name = newname
for name, newname in namelist: # get the pose bone with name pb = obj.pose.bones.get(name) # continue if no bone of that name if pb is None: continue # rename pb.name = newname ) What iWhat I would like that script to do is change ALL Bip01_'Bip01_' for nothing, like deleting a prefix :)
Thanks!.