I'm using Mixamo's website to auto-rig some characters.
When I import the character back to 3DSMAX, all bones are going to be imported with mixamo's naming pattern, something like:
mixamo:head
mixamo:neck
mixamo:lefthand
I must rename them to a custom pattern that I'll choose, like:
bip01_hat_attachment
bip01_neck
bip01_Lhand
Could someone provide a working 3DSMAX 2011 script to find, select and replace the name of specific bones?
Thanks in advance!
-------------------------------------------------------------------
@Rotem
I've implemented your script, but only the first bone changes it's name. I've also forgotten to mention that I'm actually using dummies, not bones (don't know if it makes any difference)
Here's my complete code (running on 3DSMAX 2011):
Sample.fbx with the named bones: http://www.mediafire.com/download/1o5ci5cj254ksrj/sample.FBX
(
local fromPrefix = "mixamorig:"
local toPrefix = "Bip01_"
local nameMap = #( \
dataPair "Hips" "Pelvis",
dataPair "Spine" "Spine",
dataPair "Spine1" "Spine1",
dataPair "Spine2" "Spine2",
dataPair "Neck" "Neck",
dataPair "Head" "Head",
dataPair "HeadTop_End" "HeadTop_End",
dataPair "LeftShoulder" "L_Clavicle",
dataPair "LeftArm" "L_UpperArm",
dataPair "LeftForeArm" "L_Forearm",
dataPair "LeftHand" "L_Hand",
dataPair "LeftHandThumb1" "L_Finger0",
dataPair "LeftHandThumb2" "L_Finger01",
dataPair "LeftHandThumb3" "L_Finger02",
dataPair "LeftHandThumb4" "L_Finger03",
dataPair "LeftHandIndex1" "L_Finger1",
dataPair "LeftHandIndex2" "L_Finger11",
dataPair "LeftHandIndex3" "L_Finger12",
dataPair "LeftHandIndex4" "L_Finger13",
dataPair "LeftHandMiddle1" "L_Finger2",
dataPair "LeftHandMiddle2" "L_Finger21",
dataPair "LeftHandMiddle3" "L_Finger22",
dataPair "LeftHandMiddle4" "L_Finger23",
dataPair "LeftHandRing1" "L_Finger3",
dataPair "LeftHandRing2" "L_Finger31",
dataPair "LeftHandRing3" "L_Finger32",
dataPair "LeftHandRing4" "L_Finger33",
dataPair "LeftHandPinky1" "L_Finger4",
dataPair "LeftHandPinky2" "L_Finger41",
dataPair "LeftHandPinky3" "L_Finger42",
dataPair "LeftHandPinky4" "L_Finger43",
dataPair "RightShoulder" "R_Clavicle",
dataPair "RightArm" "R_UpperArm",
dataPair "RightForeArm" "R_Forearm",
dataPair "RightHand" "R_Hand",
dataPair "RightHandThumb1" "R_Finger0",
dataPair "RightHandThumb2" "R_Finger01",
dataPair "RightHandThumb3" "R_Finger02",
dataPair "RightHandThumb4" "R_Finger03",
dataPair "RightHandIndex1" "R_Finger1",
dataPair "RightHandIndex2" "R_Finger11",
dataPair "RightHandIndex3" "R_Finger12",
dataPair "RightHandIndex4" "R_Finger13",
dataPair "RightHandMiddle1" "R_Finger2",
dataPair "RightHandMiddle2" "R_Finger21",
dataPair "RightHandMiddle3" "R_Finger22",
dataPair "RightHandMiddle4" "R_Finger23",
dataPair "RightHandRing1" "R_Finger3",
dataPair "RightHandRing2" "R_Finger31",
dataPair "RightHandRing3" "R_Finger32",
dataPair "RightHandRing4" "R_Finger33",
dataPair "RightHandPinky1" "R_Finger4",
dataPair "RightHandPinky2" "R_Finger41",
dataPair "RightHandPinky3" "R_Finger42",
dataPair "RightHandPinky4" "R_Finger43",
dataPair "LeftUpLeg" "L_Thigh",
dataPair "LeftLeg" "L_Calf",
dataPair "LeftFoot" "L_Foot",
dataPair "LeftToeBase" "L_Toe0",
dataPair "LeftToe_End" "L_Toe0_End",
dataPair "RightUpLeg" "R_Thigh",
dataPair "RightLeg" "R_Calf",
dataPair "RightFoot" "R_Foot",
dataPair "RightToeBase" "R_Toe0",
dataPair "RightToe_End" "R_Toe0_End"
)
for namePair in nameMap do
(
local fromName = fromPrefix + namePair.v1
for o in getNodebyName fromName all:on do
(
o.name = toPrefix + namePair.v2
)
)
)
What could be the problem?
mixamo:foo
tobip01:foo
?mixamo:left_foot
tobip01_Lfoot
andmixamo:neck
tobip01_neck_special_effects_attachment