PDA

View Full Version : Layout-Modeler Communcation



lwsammy
01-13-2008, 08:51 PM
I was wondering if there's a way to invoke a modeler command from within the layout and make it run in modeler. For example activating a modeler plug-in from layout. Is there such communication between the modeler and layout?

Help appreciated.

Svenart
01-13-2008, 09:08 PM
Al least there was someting like this for LW8.5. Take a look at this scripts:

http://www.interialabs.de/lw/lscript/files/IL_OneClickScene2Obj_101.zip

However, it seems they donīt work in lw9.3. If you can find out why, please let me know.

lwsammy
01-13-2008, 09:26 PM
Thanks. I tried the communication ring, but it does not work a cross the layouts. Hope they are aware of the problem.

evenflcw
01-13-2008, 11:30 PM
Are you on LW8.5 or higher? If you are, perhaps you could issue the command right in Layout which handle commandsequence aswell as meshdataedits (not meshedittool) since 8.x. I'm not sure it will handle selpoints/selpolygon properly though. But it's not unlikely that those will work too (you just won't see it). If the code is completely meshdataedit without selection changes I don't think you will come across any limits.

lwsammy
01-14-2008, 12:27 AM
Well yeah using version 9.3.1

Which command to invoke from layout? It seems that the SDK is strictly to support isolation of the two modules. May have advantages but to develop decent plugins we need a way to communicate between the two at least, not necessarily being able to modify the mesh from within layout, though it would be great if it's available.

evenflcw
01-14-2008, 01:11 AM
I'm not entirely sure what to use from the sdk, but I would venture a guess on CommandInput(). From lscript you just issue the meshedit() from a layoutgeneric if I remember correctly. It might work from other plugintypes aswell, but it is unsafe.

lwsammy
01-14-2008, 01:15 AM
Sounds great, but is it possible to invoke lscript with sdk functions? for example the evaluate function?

evenflcw
01-14-2008, 04:00 AM
You expressed yourself quite ambiguously.

No, I don't think you can have use lscript functions from within a plugin except for some interface thingamajig.

Yes, you can call modeler lscripts and plugins alike via CommandInput command in Layout.


sprintf( msg, "%s %s", "CommandInput", "ModCommand_myModelerPlugin" );
local->evaluate( local->data, msg );

You should have some Modeler plugins installed already in layout. Open up the LS Commander and see what happens when you run them. Whatever the Commander spits out in "CS" you can issue through CommandInput (I think). You might have some trouble sending arguments to your plugins though. I know you can't send arguments on execution to lscripts and I doubt you can to plugins (please prove me wrong!). So I guess you might have to resort to textfiles anyways if you want to vary the plugins behaviour.

lwsammy
01-14-2008, 12:57 PM
I don't think this command even exists...lol but anyway...It's :lwicon:

Hope :lwicon: team is aware of this problem and they should provide more facilities and services to better communicate and integration between layout and modeler. This helps developing plugins and enrich the features of LW...frankly it lags behind other competitors for an obvious reason.