StefanStavrev
11-20-2006, 05:57 AM
I wrote this script to rename multiple selected objects with one name plus apropriate integer.
For example i set the name to stefan , the first selected object will be stefan,the second stefan1,then stefan2,stefan3 ....
A problem eoccurs when i rename parented objects.For example, i have two cubes in my scene.One is parent and one i child.By excecuting this script they both receive stefan.
By the way i select them firts as separate objects.Here is the script :
//////////////////////////////////////////////////////
proc renameObjectsOneName() {
string $sel[] = `ls -sl`;
for($each in $sel) {
string $Text = `textField -q -text textfield1`;
rename $each $Text;
}
}
//////////////////////////////////////////////////////
You have any idea how to make it work with parented objects too ?
For example i set the name to stefan , the first selected object will be stefan,the second stefan1,then stefan2,stefan3 ....
A problem eoccurs when i rename parented objects.For example, i have two cubes in my scene.One is parent and one i child.By excecuting this script they both receive stefan.
By the way i select them firts as separate objects.Here is the script :
//////////////////////////////////////////////////////
proc renameObjectsOneName() {
string $sel[] = `ls -sl`;
for($each in $sel) {
string $Text = `textField -q -text textfield1`;
rename $each $Text;
}
}
//////////////////////////////////////////////////////
You have any idea how to make it work with parented objects too ?
