setobjectrect(object,rect[])

Discuss Lemur and share techniques.
Post Reply
Softcore
Regular
Posts:1639
Joined:04 Nov 2012 08:34
setobjectrect(object,rect[])

Post by Softcore » 22 Jan 2015 07:54

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:340
Joined:01 Oct 2010 11:06

Re: setobjectrect(object,rect[])

Post by nick_liine » 22 Jan 2015 08:25

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:1639
Joined:04 Nov 2012 08:34

Re: setobjectrect(object,rect[])

Post by Softcore » 22 Jan 2015 10:23

lol I feel stupid now! I was using setattribute for "rect" all this time! lol

Phil999
Regular
Posts:932
Joined:11 Jan 2012 01:53

Re: setobjectrect(object,rect[])

Post by Phil999 » 22 Jan 2015 18:08

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:279
Joined:23 May 2014 00:24

Re: setobjectrect(object,rect[])

Post by ndivuyo » 22 Jan 2015 18:27

Yea I was confused when I saw it in the canvas tutorials too. But hey, makes things easier!

Softcore
Regular
Posts:1639
Joined:04 Nov 2012 08:34

Re: setobjectrect(object,rect[])

Post by Softcore » 23 Jan 2015 20:52

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:932
Joined:11 Jan 2012 01:53

Re: setobjectrect(object,rect[])

Post by Phil999 » 23 Jan 2015 23:47

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:1639
Joined:04 Nov 2012 08:34

Re: setobjectrect(object,rect[])

Post by Softcore » 25 Jan 2015 22:52

Ah ok then! All good!

Post Reply