ScriptSpot is a diverse online community of artists and developers who come together to find and share scripts that empower their creativity with 3ds Max. Our users come from all parts of the world and work in everything from visual effects to gaming, architecture, students or hobbyists.
(
global reNman
global objinSel
try(destroyDialog reNman)catch()
rollout reNman "Rename Tools" width:156 height:46(
editText edt_InText "" pos:[0,3] width:151 height:19 enabled:false
button btn_ren "Rename Object" pos:[4,25] width:150 height:19 enabled:false
fn objInSel=
(ifselection.count ==1 then
(
edt_InText.enabled =true
btn_ren.enabled =true
edt_InText.text=$.name
)elseifselection.count>=2 then
(
edt_InText.text=""
edt_InText.enabled =true
btn_ren.enabled =true
edt_InText.text=selection[1].name
)elseifselection.count==0 do(
edt_InText.enabled =false
btn_ren.enabled=false
edt_InText.text=""))
on btn_ren pressed do(
undo "rename my object" on
(for i in selection where selection.count!=0 do(
i.name = uniquename (edt_InText.text+" "))))
on reNman close do(
callbacks.removeScripts #selectionSetChanged id:#ObjNameCall
)
on reNman open do(
callbacks.addScript #selectionSetChanged "renman.objInSel()" id:#ObjNameCall
))
createDialog reNman
)
it's little bit oto , see the script....its use callback to call the name of object, theres 3 action, if none selection, if selection==1 , and if selection +2 or more....
Press "E"(EditMode) checkbutton if you want to change name of selection.
Press Enter Key to assigne new unique name to selection.
This is the "Renamer" script
try(destroyDialog ::test)catch()(
rollout test " Renamer"(
edittext et "" pos:[-2,2] fieldwidth:146 height:17
checkbutton chb "E" pos:[151,2] width:17 height:17 tooltip:"Edit Mode"
timer checkSel "" interval:200
on checkSel tick do(ifselection.count == 0 then (et.enabled = false ; et.text = "")else(
et.enabled = trueifselection.count == 1 then et.text = selection[1].name else et.text = "Selected Objects: "+ selection.count as string
))
on chb changed state doif state then checkSel.active = falseelse checkSel.active = true
on et entered txt do(for o in selectiondo o.name = uniquename et.text))
createdialog test 17021 style:#(#style_titlebar, #style_sysmenu, #style_toolwindow))
Comments
Name Tools
it's little bit oto , see the script....its use callback to call the name of object, theres 3 action, if none selection, if selection==1 , and if selection +2 or more....
Press "E"(EditMode)
Press "E"(EditMode) checkbutton if you want to change name of selection.
Press Enter Key to assigne new unique name to selection.
This is the "Renamer" script
bga
You looking for this
bga
thank you but...
thank you for good answer
some more ask...
in text box , i can see object name
i have to modfiy that text little -> apply modify name to other object
but that is only read mode ?
can you understand ? sorry my poor english
For what reason? do you want
For what reason? do you want to chance the name of it or something?
John Martini
Digital Artist
http://www.JokerMartini.com (new site)
yes
my purpose is to study simple text box only
You need rename tool, right?
You need rename tool, right?
bga
i would like to apply many other script
first of all, my first script is rename tool
i would like to apply many
Not understand your question
bga
okay i see
if i select 1 object , that name is showed
but i can see only , i cant edit that text
example )
seleted object name : used-car-model
wanted object name : used-car-new
if i edit text-box , only i deleted - model and add - new
but if i do not eidt text-box , i have to write all letter
do you understand ?