Home  Previous Next

Command button presets are a bunch of scripts to speed up the command button creating process.

Those preset scripts enable you to create command button without coding in future.

In designer mode, with edit tool editTool / command-button tool commandBtnTool activated, right click on view, select Add command button menu,

the menu list out all the command presets, select one preset to create your command button,

the code in the preset will be the command of the command-button, the file name will be the label of the button, except all the "_" are replaced with " ".

Furthermore,  if there is a .tooltip file beside the preset script file, with the same file name as the script file, the content of the .tooltip file will be the tool tip text of the created command-button.

For example, if you got a command-button preset script called:

Keyframe_Changed_Channels.mel

and within the same folder you got:

Keyframe_Changed_Channels.tooltip

then if you create a command-button based on preset script, the button will have a label called "Keyframe Changed Channels", and a tooltip that is the content of Keyframe_Changed_Channels.tooltip file.

 

How to create command button preset?

Go to "Misc Menu / Create Presets/Code Snippets..", or in any code editing widget, click on the top-right triangle menu, select "Export As Command Button Preset..".

In the pop-up dialog, input the category, the preset name, code and tooltip text and create.

 

Where are those command button preset scripts?

For factory default preset scripts, they are in the Maya's user script folder/ MG-PickerStudio/MGPicker_Program/CommandButtonPresets,

the factory default preset scripts are maintained by the developer of MG-Picker Studio so better keep it intact.

For user command preset scripts, please put them here: Maya's user script folder/MG-PickerStudio/MGPicker_UserConfig/CommandButtonPresets.

 

Home Previous Next