View Full Version : Non-modal LightWave Panels

09-12-2006, 04:15 PM
I was curious if there is a way to have non-modal panels that can still issue commands to Modeler or Layout? For example using the modal CommandSequence class after you have opened your panel, essentially leaving your activation function (ActivateFunc).

An example of this is the "Layer Panel" in Modeler which is non-modal.

09-12-2006, 04:25 PM
No Non-Modal in Modeler.
Generic Layout also only Modal.

It is what it is ... for now. :thumbsup:

09-13-2006, 02:44 AM
You can do it in Layout, using the command sequence global.
Basically open a (x)panel in the generic and handle all events using callbacks.

I wouldn't use it for anything mission critical though (incidentally, the infiniMap Pro image browser works like that).


09-13-2006, 09:20 AM
Sounds good, thanks for the replies. Having a non-modal panel using a CommandSequence class isn't really essential for me,
and I discovered that my Layout plug-in doesn't really need to send commands. :jam:

I have discovered a couple plug-ins that use LScripts to create non-modal panels (for both Layout and Modeler) that tap into
dll plug-ins for "helper" functions. Don't think I need to do this though.

Best regards,

02-24-2007, 03:36 PM
I have discovered a couple plug-ins that use LScripts to create non-modal panels (for both Layout and Modeler)

how to create non-modals panel in Modeler?

02-25-2007, 03:24 AM
Printf, if you are speaking of Lscript
there's no non-modal panel in Modeler,
but you can fake it.

val = 0;



c1 = ctlminislider("Test",val,1,10);//Your Parameter list

ctlrefresh(c1,"call");//For each parameter




//Your main function here


03-01-2007, 10:47 AM
I now realize the modeler LScripts did fake it, and they weren't really interactive.

I read in the forums here that you can use a MeshEditTool plugin class to create non-modal plugins. My conclusion: no, not really. Sure, I can make a MeshEditTool and use the numeric panel with an XPanel. But that has a series of problems:

1) If the user disables the tool, say they are in point selection mode and hit the Polygon button to go into polygon selection, your plugin is killed and there is no way to get a valid MeshEditOp* (like in the Build() callback).

2) The Build() callback is only called for certain reasons (like clicking in the viewport) so if you make your own panel (not XPanel in numeric panel), any control callbacks you have hooked up still wont have access to the MeshEditOp* (if the user clicks on one of your controls).

3) Calling the LWMeshEditTool->build explicitly is useless (for my case) as it requires a MeshEditOp* which is what I am trying to get in the first place.

So, essentially, there is no way to issue modeler commands from a non-modal plugin.

If I didn't have to issue modeler commands (or do mesh edit ops):
I'm not sure if the GlobalFunc* becomes invalid, but if it does, I could simply create my own Global class plugin that fetches the data I need.

My question to :newtek:ewTek is:

Why can't there be a Global to fetch a valid MeshEditOp* or LWModCommand* ???

Maybe provide the user with a callback function that hooks into that Global, giving them access to the MeshEditOp/LWModCommand until their callback returns (like an activation function)....something along those lines....it just seems do-able. If my MeshEditTool can recieve a MeshEditOp* in it's Build() callback, why can't I explicitly request for one with a fuction call?

If I am completely missing something please let me know :thumbsup:

Best regards,