Resizing by script

Discuss Lemur and share techniques.
Post Reply
amundsen
Regular
Posts: 62
Joined: 04 May 2013 19:11

Resizing by script

Post by amundsen »

Hello,

I have a series of MultiBall I want to resize on their height axis.

I am trying this script :

Code: Select all

decl i, current,name;
for (i = 1;i < 27 ;i++) {
	name = 'MultiBall'+arraytostring({i});
	current = getattribute(name, 'rect');
   set(current,128,3);
	setattribute(name,'rect',current);
}
However it does not seem to work. What 's wrong ?
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: Resizing by script

Post by Softcore »

Unfortunately you cant combine string characters like that......

Your best bet would be to create an expression with all the Multiball object names in it

for example

name= {Multiball, Multiball1, Multiball2........Multiball27};

and then use name inside the i iterations loop.
Post Reply