PDA

View Full Version : Options Box UI


kiaran
02-15-2005, 11:26 PM
Hi guys,

I want to build a ui that looks and acts exactly like an options box in Maya. I could build it from scratch but it would be nice to have a template to work from.

Does anyone know where I can find the MEL used for options boxes?

mrMotion
02-16-2005, 09:44 AM
OptionBox is just a flag on "menuItem"... You also need to allow optionBoxes with a flag on the menu command:

menu -label "mrMotion_riggingTools1.0" -to true -aob true mrMotion_riggingTools;
menuItem -label "Connections..." -command "mrMotion_connector";
menuItem -label "ConnectionsUI" -ob true -command "mrMotion_connectionsUI";

///
-aob = allowOptionBoxes
-ob = optionBox

kiaran
02-16-2005, 05:49 PM
mrMotion- Thanks for the reply.

That's not what I was going for though. :(

I just was hoping someone has the UI code for an actual options box window (see attachment). These windows aren't very complicated but they are standardized across all of Maya. Would be nice if my scripts were built to look just like the rest of Maya.

They all follow the same format. That is they have an 'edit' and a 'help' menu, followed by a column of attributes to adjust and three buttons that are attached to the bottom of the window (do action, apply and close).

If anyone knows where to find the exact MEL for one of these windows, that would be nice.

Thanks,
Kiaran

mrMotion
02-17-2005, 06:48 AM
In "C:\Program Files\Alias\Maya6.5\scripts\others" There is a file named "getOptionBox.mel"

// Description:
// Implement and provide access to the common elements of the
// option box window.

goleafsgo
02-22-2005, 01:59 AM
If anyone knows where to find the exact MEL for one of these windows, that would be nice.

For the code to the example image you posted look in the file performSkinCluster.mel and inside that the global proc skinClusterOptions.
If you follow that proc you can create your own UI which will take over the regular options window. Some of the more important procs are: getOptionBox, getOptionBoxApplyBtn, getOptionBoxSaveBtn and showOptionBox.

CGTalk Moderation
02-22-2006, 02:00 AM
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.