Home  Previous Next

Code snippets are a block of codes to speed up the coding process.

In the code editor of attribute editor, for example, the command of a command-button, or the menu editor with one menu item been activated.

Press the down arrow button at the top right corner of the code editor, the menu contains all the code snippets of current language type ( mel / python ) will pop up,

select one of the code snippet, the content of that snippet script file will be inserted into the cursor position of code editor.

 

How to create code snippet?

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

In the pop-up dialog, input the category, the code snippet name and code and create.

 

Where are those code snippet scripts?

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

the factory default code snippet 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/CodeSnippets.

Organize different type of snippet into two different folder: MEL/Python.

 

Home Previous Next