PDA

View Full Version : Selection of objects in Modeler ...



alunbjorksten
07-22-2003, 01:38 AM
I'm trying to write a script that loads up multiple object files into Modeler simultaneously, then copies and pastes layers of those in different combinations.

I am having real trouble setting the active object file! When I try to do something like this:


@script modeler

load(D:\modelfile1.lwo);
object_handle1 = Mesh(0);

load(D:\modelfile2.lwo);
object_handle2 = Mesh(0);

object_handle1.select();
copy();

object_handle2.select();
paste();


I get no joy on the use of "select()" method in Modeler. Works OK in Layout, but not modeler. Anyone know what I can do to select the active object in a Modeler script?

ANY help would be very much appreciated.

Cheers,
Al.

alunbjorksten
07-22-2003, 08:00 AM
OK, so some further research has unearthed the use of the

setobject("MyObjectName")

function, and this can be used to achieve what I wanted like this:


load("C:\object1.lwo");
object[1] = Mesh(0);

load("C:\object2.lwo");
object[2] = Mesh(0);

setobject(object[1].name);

...


Hope that's of use to some people out there. It certainly isn't easy to find the "setobject" function in the doco!

Cheers, Al.

richpr
07-22-2003, 12:41 PM
It isn't easy to find a lot of things... The LScript manuals could use a rewrite... And they should be merged into one nice manual...

The first bunch of chapters on how to use with loads of examples...

The rest should be reference on the language and objects, massively cross-referenced in a good index. Pretty much every function and object should have an example provided for its use.

faulknermano
07-24-2003, 08:35 AM
Originally posted by richpr
It isn't easy to find a lot of things... The LScript manuals could use a rewrite... And they should be merged into one nice manual...


yup. it's hard to find something when you're not sure what you are looking for. me, i just got used to the release notes when i was taking up lscript that i find the current pdfs quite a treat. pretty spartan, eh? :D

the lscript manual can easily be twice or thrice larger than it is now. in fact there are a still alot of features that arent covered in the pdfs. so be sure to check the release notes.