Page 1 of 1

Request to the plugin writer

Posted: Thu Jun 03, 2010 4:23 pm
by PhilLawson
Hello,

Just a quick note to whoever is the plug-in/script writer for the modo exporter in that if you are using sceneservice or layerservice commands though a scripting interpretor, you will find that it is much faster using the ScriptQuery Interfaces (see page 112 of the scripting and commands documentation). Slightly more code, but the time difference is well worth it.

i.e.

Code: Select all

svc = lx.Service("layerservice")
svc.select("verts", "all")
verts = svc.query("verts")
svc.select("vmaps", "all")
svc.select("vmap.name", "0")
for vert in verts:
    svc.select("vert.vmapValue", vert)
    vmapval = svc.query("vert.vmapValue")
will be much faster than:-

Code: Select all

for vert in verts:
    lx.eval('query layerservice vert.vmapValue ? %s' % vert)
Cheers

Re: Request to the plugin writer

Posted: Fri Jun 04, 2010 11:00 am
by stenson
Hey Phil! Great to see you here!

I'll definitely have this in mind!
I'm going to do some tests to find out how much faster it is.

cheers

Re: Request to the plugin writer

Posted: Fri Jun 04, 2010 12:31 pm
by PhilLawson
Hi Fredrik! Also good to see you here.

It is a great deal faster - Gwynne posted a rather nice comparative test between the two methods (sorry, can't remember where), and the timings with complex scenes were reduced greatly. The same method can be applied to sceneservice, but I personally find it more of a benefit when working with selected components and vmaps.

Cheers.

EDIT: Of course, if your using the File I/O SDK, then the above is moot as the slowdown occurs through the python/perl interpretors. :)

Re: Request to the plugin writer

Posted: Tue Jun 08, 2010 9:47 am
by archigrafix
great to see things are moving here! So when you plan for version we can test? I know it's perhaps a little too direct but a plugin for direct export is needed so much...

Re: Request to the plugin writer

Posted: Fri Jun 11, 2010 6:08 pm
by El Burritoh
So Frederik is doing this? Awesome! Can't wait!