PDA

View Full Version : Accessing point location from layout?



mhibbs
03-20-2003, 01:25 PM
Hi all, I'm new to the forum and to LScript, so please forgive my naivete in advance.

I'm trying to write a script that will convert a lightwave scene to another file format. The idea is that I need to know the coordinates of all the points for each object at every frame (we're only dealing with fairly short scenes). But I'm unsure about how to access the point location data from within a layout script. Is this possible? and if so, how?

Thanks,
Matt

faulknermano
03-20-2003, 08:52 PM
there are two ways to do it.

you can use a displacement map script to directly gather points. but that seems, for your case, too much of a go-around.

the other way is to get the Mesh Object Agent of you items directly:



...
mesh = Mesh("myObject");
...


and then use the points data member to retrieve the point. then use the position method to get the position of the point:



...
mesh = Mesh("myObject");
p = mesh.points[1];
vec = mesh.position(p);

mhibbs
03-21-2003, 12:41 PM
Hi, thanks for the reply,

I've tried to run do what you're suggesting, but I get errors whenever I try to use the return value of "mesh.points[1];"
Is 'points' a data member of mesh objects? (It's not documented in the manual, but lots of members/functions appear to be undocumented...)

Is there a way to run a modeler script from within layout?

Matt

mhibbs
03-21-2003, 01:45 PM
Nevermind.... :rolleyes: I guess my naivete shined through after all... 'points' is indeed a data member, and this bit of code does work.

Thanks again, I really appreciate it!