setobjectrect(object,rect[])

Discuss Lemur and share techniques.
Post Reply
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

setobjectrect(object,rect[])

Post by Softcore »

How long has it been there? Just noticed it yesterday!

Provided, that rect is an attribute that you can change with setattribute, why was it implemented? Just for ease of use? Am I missing something important here?

I also saw getobjectrect(object).....

Same questions apply. Of course I can see that now the basic function of getting the rect for a canvas object is now much more simplified with this function.
nick_liine
Liine Staff
Posts: 285
Joined: 01 Oct 2010 11:06

Re: setobjectrect(object,rect[])

Post by nick_liine »

Been there since we introduced scripting in 2.0. It's a basic function for creating dynamic patches, moving/resizing objects. Welcome to the party. ;-)
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: setobjectrect(object,rect[])

Post by Softcore »

lol I feel stupid now! I was using setattribute for "rect" all this time! lol
Phil999
Regular
Posts: 919
Joined: 11 Jan 2012 01:53

Re: setobjectrect(object,rect[])

Post by Phil999 »

that was also used in the Canvas examples.

I think it doesn't matter what method we use, both do the same.
Formant+Eurorack, PPG wave 2.2, Korg MS-20, etc., EWI 4000s, QuNeo, etc., Mixbus32c, u-he, MadronaLabs, Samplemodeling, NI, etc., iPad2/4/Pro
ndivuyo
Regular
Posts: 278
Joined: 23 May 2014 00:24

Re: setobjectrect(object,rect[])

Post by ndivuyo »

Yea I was confused when I saw it in the canvas tutorials too. But hey, makes things easier!
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: setobjectrect(object,rect[])

Post by Softcore »

wth maybe I have an older version fo the canvas tutorials?

Eveywhere I looked there's a

decl c=getobject();
decl rect = getattribute(c, 'rect');

and this is why seeing the function in the "internal" folder confused me in the first place.
Phil999
Regular
Posts: 919
Joined: 11 Jan 2012 01:53

Re: setobjectrect(object,rect[])

Post by Phil999 »

sorry, I was unclear in my comment. I meant it the same way as you.
Formant+Eurorack, PPG wave 2.2, Korg MS-20, etc., EWI 4000s, QuNeo, etc., Mixbus32c, u-he, MadronaLabs, Samplemodeling, NI, etc., iPad2/4/Pro
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: setobjectrect(object,rect[])

Post by Softcore »

Ah ok then! All good!
Post Reply