MBRenamerFloat = NewRolloutFloater "MBRenamer ver1.0" 360 490 rollout Definition "Definition" width:350 height:390 ( --layout-- label Lbl_Base "B:Base(required)" pos:[10,10] width:85 height:15 checkbox Chk_Dummy "_Dummy" pos:[10,35] width:60 height:20 checkbox Chk_End "_End" pos:[80,35] width:45 height:20 groupBox Gb_Custom "Custom" pos:[210,5] width:130 height:45 editText Tex_Custom "" pos:[215,20] width:95 height:20 button Btn_Custom "" pos:[315,20] width:20 height:20 toolTip:"Custom" button Btn_Reference "" pos:[160,365] width:25 height:20 toolTip:"Reference" button Btn_Hips "B" pos:[150,150] width:45 height:20 toolTip:"Hips" button Btn_LeftUpLeg "B" pos:[175,180] width:25 height:45 toolTip:"LeftUpLeg" button Btn_LeftLeg "B" pos:[175,260] width:25 height:45 toolTip:"LeftLeg" button Btn_LeftFoot "B" pos:[175,340] width:30 height:25 toolTip:"LeftFoot" button Btn_RightUpLeg "B" pos:[145,180] width:25 height:45 toolTip:"RightUpLeg" button Btn_RightLeg "B" pos:[145,260] width:25 height:45 toolTip:"RightLeg" button Btn_RightFoot "B" pos:[140,340] width:30 height:25 toolTip:"RightFoot" button Btn_Spine "B" pos:[145,85] width:55 height:65 toolTip:"Spine" button Btn_LeftArm "B" pos:[210,65] width:30 height:20 toolTip:"LeftArm" button Btn_LeftForeArm "B" pos:[260,65] width:30 height:20 toolTip:"LeftForeArm" button Btn_LeftHand "B" pos:[310,63] width:30 height:25 toolTip:"LeftHand" button Btn_RightArm "B" pos:[105,65] width:30 height:20 toolTip:"RightArm" button Btn_RightForeArm "B" pos:[55,65] width:30 height:20 toolTip:"RightForeArm" button Btn_RightHand "B" pos:[5,63] width:30 height:25 toolTip:"RightHand" button Btn_Head "B" pos:[155,5] width:35 height:40 toolTip:"Head" button Btn_LeftToeBase "" pos:[205,345] width:20 height:20 toolTip:"LeftToeBase" button Btn_RightToeBase "" pos:[120,345] width:20 height:20 toolTip:"RightToeBase" button Btn_LeftShoulder "" pos:[175,65] width:30 height:20 toolTip:"LeftShoulder" button Btn_RightShoulder "" pos:[140,65] width:30 height:20 toolTip:"RightShoulder" button Btn_Neck "" pos:[162,45] width:20 height:20 toolTip:"Neck" button Btn_LeftUpLegRoll "" pos:[175,225] width:25 height:35 toolTip:"LeftUpLegRoll" button Btn_LeftLegRoll "" pos:[175,305] width:25 height:35 toolTip:"LeftLegRoll" button Btn_RightUpLegRoll "" pos:[145,225] width:25 height:35 toolTip:"RightUpLegRoll" button Btn_RightLegRoll "" pos:[145,305] width:25 height:35 toolTip:"RightLegRoll" button Btn_LeftArmRoll "" pos:[240,65] width:20 height:20 toolTip:"LeftArmRoll" button Btn_LeftForeArmRoll "" pos:[290,65] width:20 height:20 toolTip:"LeftForeArmRoll" button Btn_RightArmRoll "" pos:[85,65] width:20 height:20 toolTip:"RightArmRoll" button Btn_RightForeArmRoll "" pos:[35,65] width:20 height:20 toolTip:"RightForeArmRoll" button Btn_HipsTranslation "" pos:[145,170] width:55 height:10 toolTip:"HipsTranslation" groupBox Gb_LeftHandFinger "LeftHandFinger" pos:[210,90] width:130 height:130 button Btn_LeftHandThumb1 "" pos:[215,170] width:25 height:45 toolTip:"LeftHandThumb1" button Btn_LeftHandIndex1 "" pos:[265,165] width:60 height:20 toolTip:"LeftHandIndex1" button Btn_LeftHandMiddle1 "" pos:[265,145] width:70 height:20 toolTip:"LeftHandMiddle1" button Btn_LeftHandRing1 "" pos:[265,125] width:65 height:20 toolTip:"LeftHandRing1" button Btn_LeftHandPinky1 "" pos:[265,105] width:50 height:20 toolTip:"LeftHandPinky1" button Btn_LeftHandExtraFinger1 "" pos:[270,195] width:50 height:20 toolTip:"LeftHandExtraFinger1" button Btn_LeftInHandThumb1 "" pos:[215,145] width:25 height:25 toolTip:"LeftInHandThumb1" button Btn_LeftInHandIndex1 "" pos:[240,165] width:25 height:20 toolTip:"LeftInHandIndex1" button Btn_LeftInHandMiddle1 "" pos:[240,145] width:25 height:20 toolTip:"LeftInHandMiddle1" button Btn_LeftInHandRing1 "" pos:[240,125] width:25 height:20 toolTip:"LeftInHandRing1" button Btn_LeftInHandPinky1 "" pos:[240,105] width:25 height:20 toolTip:"LeftInHandPinky1" button Btn_LeftInHandExtraFinger1 "" pos:[250,195] width:20 height:20 toolTip:"LeftInHandExtraFinger1" groupBox Gb_RightHandFinger "RightHandFinger" pos:[5,90] width:130 height:130 button Btn_RightHandThumb1 "" pos:[105,170] width:25 height:45 toolTip:"RightHandThumb1" button Btn_RightHandIndex1 "" pos:[20,165] width:60 height:20 toolTip:"RightHandIndex1" button Btn_RightHandMiddle1 "" pos:[10,145] width:70 height:20 toolTip:"RightHandMiddle1" button Btn_RightHandRing1 "" pos:[15,125] width:65 height:20 toolTip:"RightHandRing1" button Btn_RightHandPinky1 "" pos:[30,105] width:50 height:20 toolTip:"RightHandPinky1" button Btn_RightHandExtraFinger1 "" pos:[25,195] width:50 height:20 toolTip:"RightHandExtraFinger1" button Btn_RightInHandThumb1 "" pos:[105,145] width:25 height:25 toolTip:"RightInHandThumb1" button Btn_RightInHandIndex1 "" pos:[80,165] width:25 height:20 toolTip:"RightInHandIndex1" button Btn_RightInHandMiddle1 "" pos:[80,145] width:25 height:20 toolTip:"RightInHandMiddle1" button Btn_RightInHandRing1 "" pos:[80,125] width:25 height:20 toolTip:"RightInHandRing1" button Btn_RightInHandPinky1 "" pos:[80,105] width:25 height:20 toolTip:"RightInHandPinky1" button Btn_RightInHandExtraFinger1 "" pos:[75,195] width:20 height:20 toolTip:"RightInHandExtraFinger1" groupBox Gb_LeftFootFinger "LeftFootFinger" pos:[230,235] width:110 height:130 button Btn_LeftFootThumb1 "" pos:[280,335] width:55 height:25 toolTip:"LeftFootThumb1" button Btn_LeftFootIndex1 "" pos:[280,315] width:55 height:20 toolTip:"LeftFootIndex1" button Btn_LeftFootMiddle1 "" pos:[280,295] width:50 height:20 toolTip:"LeftFootMiddle1" button Btn_LeftFootRing1 "" pos:[280,275] width:45 height:20 toolTip:"LeftFootRing1" button Btn_LeftFootPinky1 "" pos:[280,255] width:35 height:20 toolTip:"LeftFootPinky1" button Btn_LeftFootExtraFinger1 "" pos:[235,255] width:20 height:50 toolTip:"LeftFootExtraFinger1" button Btn_LeftInFootThumb1 "" pos:[255,335] width:25 height:25 toolTip:"LeftInFootThumb1" button Btn_LeftInFootIndex1 "" pos:[255,315] width:25 height:20 toolTip:"LeftInFootIndex1" button Btn_LeftInFootMiddle1 "" pos:[255,295] width:25 height:20 toolTip:"LeftInFootMiddle1" button Btn_LeftInFootRing1 "" pos:[255,275] width:25 height:20 toolTip:"LeftInFootRing1" button Btn_LeftInFootPinky1 "" pos:[255,255] width:25 height:20 toolTip:"LeftInFootPinky1" button Btn_LeftInFootExtraFinger1 "" pos:[235,305] width:20 height:20 toolTip:"LeftInFootExtraFinger1" groupBox Gb_RightFootFinger "RightFootFinger" pos:[5,235] width:110 height:130 button Btn_RightFootThumb1 "" pos:[10,335] width:55 height:25 toolTip:"RightFootThumb1" button Btn_RightFootIndex1 "" pos:[10,315] width:55 height:20 toolTip:"RightFootIndex1" button Btn_RightFootMiddle1 "" pos:[15,295] width:50 height:20 toolTip:"RightFootMiddle1" button Btn_RightFootRing1 "" pos:[20,275] width:45 height:20 toolTip:"RightFootRing1" button Btn_RightFootPinky1 "" pos:[30,255] width:35 height:20 toolTip:"RightFootPinky1" button Btn_RightFootExtraFinger1 "" pos:[90,255] width:20 height:50 toolTip:"RightFootExtraFinger1" button Btn_RightInFootThumb1 "" pos:[65,335] width:25 height:25 toolTip:"RightInFootThumb1" button Btn_RightInFootIndex1 "" pos:[65,315] width:25 height:20 toolTip:"RightInFootIndex1" button Btn_RightInFootMiddle1 "" pos:[65,295] width:25 height:20 toolTip:"RightInFootMiddle1" button Btn_RightInFootRing1 "" pos:[65,275] width:25 height:20 toolTip:"RightInFootRing1" button Btn_RightInFootPinky1 "" pos:[65,255] width:25 height:20 toolTip:"RightInFootPinky1" button Btn_RightInFootExtraFinger1 "" pos:[90,305] width:20 height:20 toolTip:"RightInFootExtraFinger1" button Btn_Props0 "Props" pos:[220,370] width:120 height:15 toolTip:"Props0" --fn-- fn Rename Tooltip = ( local No = 0 if findString Tooltip "1" != undefined then No += 1 if Chk_Dummy.checked == true and Chk_End.checked == true and findString Tooltip "1" != undefined then No += 1 local selObj = #() for s in selection do append selObj s for s2 in selObj do ( select s2 if findString $.name ":" != undefined then ( local filterName = filterString $.name ":" $.name = "" for s3 = 1 to filterName.count-1 do $.name = append $.name (filterName[s3] + ":") $.name = append $.name Tooltip ) else $.name = Tooltip if Chk_Dummy.checked == true then ( if findString Tooltip "1" != undefined then No -= 1 $.name = append $.name Chk_Dummy.caption ) if Chk_End.checked == true then ( if findString Tooltip "1" != undefined then No -= 1 $.name = append $.name Chk_End.caption ) if No >= 1 then ( $.name = trimright $.name "1234567890" $.name = append $.name (No as string) ) No += 1 if Chk_Dummy.checked == true and findString Tooltip "1" != undefined then No += 1 if Chk_End.checked == true and findString Tooltip "1" != undefined then No += 1 ) select selObj ) --code-- on Btn_Custom pressed do Rename Tex_Custom.text on Btn_Reference pressed do Rename Btn_Reference.toolTip on Btn_Hips pressed do Rename Btn_Hips.toolTip on Btn_LeftUpLeg pressed do Rename Btn_LeftUpLeg.toolTip on Btn_LeftLeg pressed do Rename Btn_LeftLeg.toolTip on Btn_LeftFoot pressed do Rename Btn_LeftFoot.toolTip on Btn_RightUpLeg pressed do Rename Btn_RightUpLeg.toolTip on Btn_RightLeg pressed do Rename Btn_RightLeg.toolTip on Btn_RightFoot pressed do Rename Btn_RightFoot.toolTip on Btn_Spine pressed do Rename Btn_Spine.toolTip on Btn_LeftArm pressed do Rename Btn_LeftArm.toolTip on Btn_LeftForeArm pressed do Rename Btn_LeftForeArm.toolTip on Btn_LeftHand pressed do Rename Btn_LeftHand.toolTip on Btn_RightArm pressed do Rename Btn_RightArm.toolTip on Btn_RightForeArm pressed do Rename Btn_RightForeArm.toolTip on Btn_RightHand pressed do Rename Btn_RightHand.toolTip on Btn_Head pressed do Rename Btn_Head.toolTip on Btn_LeftToeBase pressed do Rename Btn_LeftToeBase.toolTip on Btn_RightToeBase pressed do Rename Btn_RightToeBase.toolTip on Btn_LeftShoulder pressed do Rename Btn_LeftShoulder.toolTip on Btn_RightShoulder pressed do Rename Btn_RightShoulder.toolTip on Btn_Neck pressed do Rename Btn_Neck.toolTip on Btn_LeftUpLegRoll pressed do Rename Btn_LeftUpLegRoll.toolTip on Btn_LeftLegRoll pressed do Rename Btn_LeftLegRoll.toolTip on Btn_RightUpLegRoll pressed do Rename Btn_RightUpLegRoll.toolTip on Btn_RightLegRoll pressed do Rename Btn_RightLegRoll.toolTip on Btn_LeftArmRoll pressed do Rename Btn_LeftArmRoll.toolTip on Btn_LeftForeArmRoll pressed do Rename Btn_LeftForeArmRoll.toolTip on Btn_RightArmRoll pressed do Rename Btn_RightArmRoll.toolTip on Btn_RightForeArmRoll pressed do Rename Btn_RightForeArmRoll.toolTip on Btn_HipsTranslation pressed do Rename Btn_HipsTranslation.toolTip on Btn_LeftHandThumb1 pressed do Rename Btn_LeftHandThumb1.toolTip on Btn_LeftHandIndex1 pressed do Rename Btn_LeftHandIndex1.toolTip on Btn_LeftHandMiddle1 pressed do Rename Btn_LeftHandMiddle1.toolTip on Btn_LeftHandRing1 pressed do Rename Btn_LeftHandRing1.toolTip on Btn_LeftHandPinky1 pressed do Rename Btn_LeftHandPinky1.toolTip on Btn_LeftHandExtraFinger1 pressed do Rename Btn_LeftHandExtraFinger1.toolTip on Btn_LeftInHandThumb1 pressed do Rename Btn_LeftInHandThumb1.toolTip on Btn_LeftInHandIndex1 pressed do Rename Btn_LeftInHandIndex1.toolTip on Btn_LeftInHandMiddle1 pressed do Rename Btn_LeftInHandMiddle1.toolTip on Btn_LeftInHandRing1 pressed do Rename Btn_LeftInHandRing1.toolTip on Btn_LeftInHandPinky1 pressed do Rename Btn_LeftInHandPinky1.toolTip on Btn_LeftInHandExtraFinger1 pressed do Rename Btn_LeftInHandExtraFinger1.toolTip on Btn_RightHandThumb1 pressed do Rename Btn_RightHandThumb1.toolTip on Btn_RightHandIndex1 pressed do Rename Btn_RightHandIndex1.toolTip on Btn_RightHandMiddle1 pressed do Rename Btn_RightHandMiddle1.toolTip on Btn_RightHandRing1 pressed do Rename Btn_RightHandRing1.toolTip on Btn_RightHandPinky1 pressed do Rename Btn_RightHandPinky1.toolTip on Btn_RightHandExtraFinger1 pressed do Rename Btn_RightHandExtraFinger1.toolTip on Btn_RightInHandThumb1 pressed do Rename Btn_RightInHandThumb1.toolTip on Btn_RightInHandIndex1 pressed do Rename Btn_RightInHandIndex1.toolTip on Btn_RightInHandMiddle1 pressed do Rename Btn_RightInHandMiddle1.toolTip on Btn_RightInHandRing1 pressed do Rename Btn_RightInHandRing1.toolTip on Btn_RightInHandPinky1 pressed do Rename Btn_RightInHandPinky1.toolTip on Btn_RightInHandExtraFinger1 pressed do Rename Btn_RightInHandExtraFinger1.toolTip on Btn_LeftFootThumb1 pressed do Rename Btn_LeftFootThumb1.toolTip on Btn_LeftFootIndex1 pressed do Rename Btn_LeftFootIndex1.toolTip on Btn_LeftFootMiddle1 pressed do Rename Btn_LeftFootMiddle1.toolTip on Btn_LeftFootRing1 pressed do Rename Btn_LeftFootRing1.toolTip on Btn_LeftFootPinky1 pressed do Rename Btn_LeftFootPinky1.toolTip on Btn_LeftFootExtraFinger1 pressed do Rename Btn_LeftFootExtraFinger1.toolTip on Btn_LeftInFootThumb1 pressed do Rename Btn_LeftInFootThumb1.toolTip on Btn_LeftInFootIndex1 pressed do Rename Btn_LeftInFootIndex1.toolTip on Btn_LeftInFootMiddle1 pressed do Rename Btn_LeftInFootMiddle1.toolTip on Btn_LeftInFootRing1 pressed do Rename Btn_LeftInFootRing1.toolTip on Btn_LeftInFootPinky1 pressed do Rename Btn_LeftInFootPinky1.toolTip on Btn_LeftInFootExtraFinger1 pressed do Rename Btn_LeftInFootExtraFinger1.toolTip on Btn_RightFootThumb1 pressed do Rename Btn_RightFootThumb1.toolTip on Btn_RightFootIndex1 pressed do Rename Btn_RightFootIndex1.toolTip on Btn_RightFootMiddle1 pressed do Rename Btn_RightFootMiddle1.toolTip on Btn_RightFootRing1 pressed do Rename Btn_RightFootRing1.toolTip on Btn_RightFootPinky1 pressed do Rename Btn_RightFootPinky1.toolTip on Btn_RightFootExtraFinger1 pressed do Rename Btn_RightFootExtraFinger1.toolTip on Btn_RightInFootThumb1 pressed do Rename Btn_RightInFootThumb1.toolTip on Btn_RightInFootIndex1 pressed do Rename Btn_RightInFootIndex1.toolTip on Btn_RightInFootMiddle1 pressed do Rename Btn_RightInFootMiddle1.toolTip on Btn_RightInFootRing1 pressed do Rename Btn_RightInFootRing1.toolTip on Btn_RightInFootPinky1 pressed do Rename Btn_RightInFootPinky1.toolTip on Btn_RightInFootExtraFinger1 pressed do Rename Btn_RightInFootExtraFinger1.toolTip on Btn_Props0 pressed do Rename Btn_Props0.toolTip ) addRollout Definition MBRenamerFloat rollout Namespace "Namespace" width:360 height:40 ( --layout-- groupBox Gb_Namespace "" pos:[5,0] width:280 height:34 editText Tex_Namespace "" pos:[5,10] width:180 height:20 button Btn_NamespaceAdd "Add" pos:[190,10] width:35 height:20 button Btn_NamespaceReplace "Replace" pos:[230,10] width:50 height:20 button Btn_NamespaceRemove "Remove" pos:[290,10] width:50 height:20 --code-- on Btn_NamespaceAdd pressed do ( if Tex_Namespace.text != "" then ( if findString Tex_Namespace.text ":" != undefined then Tex_Namespace.text = trimright Tex_Namespace.text ":" for s in selection do s.name = Tex_Namespace.text + ":" + s.name ) else ( messageBox "Input Namespace." ) ) on Btn_NamespaceReplace pressed do ( if Tex_Namespace.text != "" then ( for s in selection do ( if findString s.name ":" != undefined then ( local filterName = filterString s.name ":" s.name = Tex_Namespace.text + ":" + filterName[filterName.count] ) ) ) else ( messageBox "Input Namespace." ) ) on Btn_NamespaceRemove pressed do ( for s in selection do ( local filterName = filterString s.name ":" s.name = filterName[filterName.count] ) ) ) addRollout Namespace MBRenamerFloat