View Full Version : roll-my-own modal dialog
tempest67 03-10-2007, 10:32 PM hi, all --
my problem seems kind of common, but i haven't seen any clear answers on the internet -- how can i make my own modal dialog window -- something that pauses and allows the user to input several values at once, and then changes some state, closes the window, and moves on?
right now, i have the user jump through a sequence of prompt windows -- it works, but it's highly unwieldy.
is there any way to do this in MEL that isn't a hack? how about if i switch to C++?
thanks for any tips at all --
miranda
|
|
sparaig
03-12-2007, 04:33 PM
hi, all --
my problem seems kind of common, but i haven't seen any clear answers on the internet -- how can i make my own modal dialog window -- something that pauses and allows the user to input several values at once, and then changes some state, closes the window, and moves on?
right now, i have the user jump through a sequence of prompt windows -- it works, but it's highly unwieldy.
is there any way to do this in MEL that isn't a hack? how about if i switch to C++?
thanks for any tips at all --
miranda
At least in 6.0, promptDialog is a command--that is, written in C++, so you would have to "roll your own" dialog box to do that. You MIGHT be able to do it easier with the new Python API interface. Does the dialog absolutely have to be modal?
tempest67
03-12-2007, 05:05 PM
At least in 6.0, promptDialog is a command--that is, written in C++, so you would have to "roll your own" dialog box to do that. You MIGHT be able to do it easier with the new Python API interface. Does the dialog absolutely have to be modal?
Thanks -- I guess I'll look into C++ or the Python API interface. Yes, it does -- I am creating a nurbs surface, then allowing the user to discretize it -- but the user has to set several variables before the discretized surface is built -- and the build step can take several minutes for a surface with many CVs. I need to eventually move the whole thing to C++ in any case, I think, because it's starting to take a long time to run in MEL.
I'm also not sure if Maya is the correct tool for this -- whether I should just write the whole thing in C++/OpenGL, or move to Catia -- but that's another story!
-- Miranda
Robert Bateman
03-13-2007, 11:04 AM
the command you want is layoutDialog (available in Maya 7.0 onwards)
tempest67
03-13-2007, 01:12 PM
that's exactly it! thanks!
(it would be awesome if there were a visual MEL interface guide, like the one for Java Swing...)
CGTalk Moderation
03-13-2007, 01:12 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.