Sg2.9
How to query scale and rotati...
Recent RSS
How to query scale and rotation properties of objects
From:  Derek Collie
Date:  6. October 2013, 16:55

Say I rotate an object for example

mySampledRaster.rotate(22)

how do I subsequently query that object's rotation?

e.g. mySampledRaster.rotation gives undefined

similarly for scaling, I can see how to 'set' but not to 'get' the scale property of an object.

thanks

Re: How to query scale and rotation properties of objects
From:  Derek Collie
Date:  6. October 2013, 17:23

OK I discovered objects can have dynamically assigned properties so it's simple to assign a property that can be subsequently recalled.

e.g.

$mySampledRasters = new Array();
mySampledRaster.rotate(22);
mySampledRaster.rotation = 22;
mySampledRasters.push(mySampledRaster);
print(mySampledRasters[0].rotation); //22

Scripts
08.08.14, 15:24
15.05.14, 14:23
02.03.14, 19:16
18.11.13, 14:48
22.03.13, 03:05
22.02.13, 15:45
Posts
10.01.17, 16:37
19.02.16, 06:03
19.02.16, 06:00
17.01.16, 11:00
12.01.16, 13:10
25.11.15, 08:19
Script of the Moment
Ideé replacer 02.07.11
by peko