Rename objects and helper
Hello community i have a problem and i hope someone can help me :)
i want a fast rename script that renames the object and the helper.
for example: 3 boxes are linked to one helper: then the rename would be:
Box_test_01, Box_test_02, Box_test_03, Box_test_Master.
The parent helper would always be "Master" on the end, the child helper would be "H1, H2, H3...." at the end.
i would also love to write without underscore in the editText, and the script put it in the space automatically.
that is my current state :(
rollout rollout1 "Selection Batch Renamer" width:243 height:44 ( fn orgaddarr orginobj arra=(if isValidNode orginobj and isValidNode orginobj.parent do(append arra orginobj.parent;orgaddarr orginobj.parent arra)) editText edt1 "" pos:[7,8] width:140 height:27 button btn1 "Rename" pos:[158,9] width:74 height:25 on edt1 entered text do ( ) on btn1 pressed do ( local orgin_arr = #() orgaddarr selection[1] orgin_arr for i = 1 to selection.count do ( Selection[i].name=uniquename edt1.text if orgin_arr.count ==1 then ( orgin_arr.name= edt1.text + "_Master" ) ) ) ) Renamer = newRolloutFloater "Renamer" 250 95 addRollout rollout1 Renamer rolledUp:false
thanks Dragan
Attachment | Size |
---|---|
rename.jpg | 473.57 KB |