Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (
- local nameMap = #( \
- dataPair "CHR_Pelvis" "ValveBiped.Bip01_Pelvis",
- dataPair "CHR_Spine1" "ValveBiped.Bip01_Spine",
- dataPair "CHR_Spine2" "ValveBiped.Bip01_Spine1",
- dataPair "CHR_Spine3" "ValveBiped.Bip01_Spine2",
- dataPair "CHR_Ribcage" "ValveBiped.Bip01_Spine4",
- dataPair "CHR_Neck" "ValveBiped.Bip01_Neck1",
- dataPair "CHR_Head" "ValveBiped.Bip01_Head1",
- dataPair "CHR_LArmCollar" "ValveBiped.Bip01_L_Clavicle",
- dataPair "CHR_LArmUpper" "ValveBiped.Bip01_L_UpperArm",
- dataPair "CHR_LArmForeArm" "ValveBiped.Bip01_L_Forearm",
- dataPair "CHR_LArmPalm" "ValveBiped.Bip01_L_Hand",
- dataPair "CHR_LArmDigit11" "ValveBiped.Bip01_L_Finger0",
- dataPair "CHR_LArmDigit12" "ValveBiped.Bip01_L_Finger01",
- dataPair "CHR_LArmDigit13" "ValveBiped.Bip01_L_Finger02",
- dataPair "CHR_LArmDigit21" "ValveBiped.Bip01_L_Finger1",
- dataPair "CHR_LArmDigit22" "ValveBiped.Bip01_L_Finger11",
- dataPair "CHR_LArmDigit23" "ValveBiped.Bip01_L_Finger12",
- dataPair "CHR_LArmDigit31" "ValveBiped.Bip01_L_Finger2",
- dataPair "CHR_LArmDigit32" "ValveBiped.Bip01_L_Finger21",
- dataPair "CHR_LArmDigit33" "ValveBiped.Bip01_L_Finger22",
- dataPair "CHR_LArmDigit41" "ValveBiped.Bip01_L_Finger3",
- dataPair "CHR_LArmDigit42" "ValveBiped.Bip01_L_Finger31",
- dataPair "CHR_LArmDigit43" "ValveBiped.Bip01_L_Finger32",
- dataPair "CHR_LArmDigit51" "ValveBiped.Bip01_L_Finger4",
- dataPair "CHR_LArmDigit52" "ValveBiped.Bip01_L_Finger41",
- dataPair "CHR_LArmDigit53" "ValveBiped.Bip01_L_Finger42",
- dataPair "CHR_RArmCollar" "ValveBiped.Bip01_R_Clavicle",
- dataPair "CHR_RArmUpper" "ValveBiped.Bip01_R_UpperArm",
- dataPair "CHR_RArmForeArm" "ValveBiped.Bip01_R_Forearm",
- dataPair "CHR_RArmPalm" "ValveBiped.Bip01_R_Hand",
- dataPair "CHR_RArmDigit11" "ValveBiped.Bip01_R_Finger0",
- dataPair "CHR_RArmDigit12" "ValveBiped.Bip01_R_Finger01",
- dataPair "CHR_RArmDigit13" "ValveBiped.Bip01_R_Finger02",
- dataPair "CHR_RArmDigit21" "ValveBiped.Bip01_R_Finger1",
- dataPair "CHR_RArmDigit22" "ValveBiped.Bip01_R_Finger11",
- dataPair "CHR_RArmDigit23" "ValveBiped.Bip01_R_Finger12",
- dataPair "CHR_RArmDigit31" "ValveBiped.Bip01_R_Finger2",
- dataPair "CHR_RArmDigit32" "ValveBiped.Bip01_R_Finger21",
- dataPair "CHR_RArmDigit33" "ValveBiped.Bip01_R_Finger22",
- dataPair "CHR_RArmDigit41" "ValveBiped.Bip01_R_Finger3",
- dataPair "CHR_RArmDigit42" "ValveBiped.Bip01_R_Finger31",
- dataPair "CHR_RArmDigit43" "ValveBiped.Bip01_R_Finger32",
- dataPair "CHR_RArmDigit51" "ValveBiped.Bip01_R_Finger4",
- dataPair "CHR_RArmDigit52" "ValveBiped.Bip01_R_Finger41",
- dataPair "CHR_RArmDigit53" "ValveBiped.Bip01_R_Finger42",
- dataPair "CHR_LThigh" "ValveBiped.Bip01_L_Thigh",
- dataPair "CHR_LCalf" "ValveBiped.Bip01_L_Calf",
- dataPair "CHR_LAnkle" "ValveBiped.Bip01_L_Foot",
- dataPair "CHR_LToe1" "ValveBiped.Bip01_L_Toe0",
- dataPair "CHR_RThigh" "ValveBiped.Bip01_R_Thigh",
- dataPair "CHR_RCalf" "ValveBiped.Bip01_R_Calf",
- dataPair "CHR_RAnkle" "ValveBiped.Bip01_R_Foot",
- dataPair "CHR_RToe1" "ValveBiped.Bip01_R_Toe0"
- -- add more mappings here
- )
- for namePair in nameMap do ( -- check name pattern
- for obj in objects where matchPattern obj.name pattern:("*" + namePair.v1 + "*") do ( -- parse all objects that match the pattern with the name of the object
- obj.name = substituteString obj.name namePair.v1 namePair.v2 -- replace the strings
- )
- )
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement