Home Coding, Scripting, Shaders

Script rename error

polycounter lvl 5
Offline / Send Message
jayantbhatt007 polycounter lvl 5
Hi, guys, I'm working on a script where it adds the suffix to an object. Suppose my object name is Sphere and I run this script the new name is Sphere_High but the problem I'm facing If I run this script again on an object the new object name is Sphere_High_High which I don't want, I know I can figure it out by adding conditions but that is also not working for me or I'm noob. Here is the command _ 

string $sel[] = `ls -sl`;
int $sSize = size($sel);
string $suffix = "_High";
for($eo in $sel)
rename $eo ($eo + $suffix); 


Sign In or Register to comment.