My tool gives the user various options for objects to rename. Poly, NURBS, Subdiv and lights. Then it gives you selection options manual selection or auto selection. I have a basic operational version of the manual mode working.
However I am having issues linking the manual mode to the manual selection menu. I only want it to work in manual mode only when manual is selected. Also it needs to check to make sure you have the right object mode selected, it should not let you manualy rename a polycube when you have NURB mode selected. Also how would I work it into my code so it will properly put a number on the end of the objects being renamed. For example myBox_01, myBox_02 and so on depending on the amount of objects being renamed? I know it has something to do with # as to where it goes in my code i am not sure textfield maybe??
Heres the code
global proc EasyName()
//Checks to see if the window exists
if (`window -query -exists Ename`)
string $menu = `window -menuBar true -title "Easy Name" Ename`;
menu -label "File" -tearOff true;
menuItem -label "Exit";
menu -label "Objects" -tearOff true;
-label "NURBS Primitives"
-label "Polygon Primitives "
-label "Subdiv Primitives"
//Selection Mode Menu
menu -label "Selection Mode" -tearOff true;
menu -label "Help" -helpMenu true -tearOff true;
-columnWidth 1 150;
textField -tx "Name me"rename_TF;
-label "Rename Object"
window -edit -widthHeight 283 90 $menu;
window -edit -tlc 180 50 $menu;
global proc namehere ()
//Querys text in the text field
string $txRename = `textField -q -tx rename_TF`;
//checks for selected objects
string $sel = `ls -sl`;
for ($ind_obj in $sel)
rename $ind_obj $txRename;