Script Mate - micro framework
ScriptMate is set to launch at the beginning of December! đ
ScriptMate is my take on solving a problem many Maya usersâespecially non-technical onesâface when trying to organize and use their Python scripts effectively. Let me tell you why I created it and how it can help you:
Motivation
Python can feel intimidating, almost magical, to non-technical people. Even when youâve made those first steps and started writing simple scripts in Maya, building interfaces with PyQt is another beast entirely. Letâs face it: most people just end up throwing buttons onto Mayaâs shelf. But hereâs the catchâMaya shelves are unreliable. Update to a new version of Maya? Boom, your scripts are gone. Corrupted preferences? Recovering them is a nightmare.
I donât trust Maya with my workflow, and Iâm pretty sure Iâm not alone. I wanted something portable, something I could set up on my workstation, share with my team, and keep everything versioned and synced without headaches. Even if youâre a solo âone-army man,â this tool will save you time and frustration.
How It Works
The logic is inspired by directory routingâa super common approach in web development. It avoids the mess of creating custom UIs for every single script, which can be a massive time sink when youâre in production. Building interfaces with PyQt is a pain, and adding even one small button often feels like more trouble than itâs worth. I wanted something simpler but still flexible.
Hereâs where ScriptMate comes in:
-
Folder-Based Menus:
-
Folders prefixed with
menu_
create a new menu. For example -menu_NewUserMenu
becomes a menu calledNew User Menu
Subfolders prefixed withsub_
create submenus. For instance,sub_Development_ModelingTools
makes aModelingTools
submenu underDevelopment
.
-
-
Template-Wrapped Scripts:
- Instead of running scripts directly, you wrap them in a simple template:
This ensures only properly wrapped functions are executed.
-
Preferences:
-
You can set a local script directory for your private scripts (not shared with others) and a global network directory for scripts visible to your team. This makes collaboration smooth, with everyone syncing to the same network path.
-
-
Hot-Reloading:
-
No more restarting Maya just to update your scripts. Simply hit the âUpdate Scriptsâ button in the plugin settings, and youâre good to go.
-
Why I Made This
I built this for myself because I was tired of wasting time and losing work. But I know it can help others too. Itâs for anyone who wants a clean, portable, and scalable way to manage scripts in Mayaâwithout having to trust Mayaâs fragile preferences system. Whether youâre a solo artist or managing a team, this tool makes organizing and deploying scripts effortless.
Go ahead, play around with it. Create a new menu_, throw in some sub_ folders, wrap your scripts with the template, and see how it all just works. Iâve kept it as simple as possible while still leaving room for you to get your hands dirty with Python if you want to.
If youâre tired of the shelf chaos, scared of PyQt, or just want a better way to keep your scripts safe and organized, give ScriptMate a shot. I hope it helps you as much as itâs helped me! đ
Installation
-
Download the Latest Version
- Grab the latest version of ScriptMate from the official repository or download page.
-
Unzip the Archive:
- After downloading, unzip the archive to reveal the following contents:
plugin_folder
(contains the plugin files).mod
file (module descriptor for Maya)
- After downloading, unzip the archive to reveal the following contents:
-
Copy Files to Mayaâs Module Directory
- You need to copy both the plugin_folder and .mod file into Mayaâs module directory. The exact path depends on your operating system:
(If the modules folder doesnât exist, you can create it manually.)
-
Restart Maya
- After copying the files, restart Maya. The plugin will automatically load, and you should see ScriptMate in your menus.
Folder Structure Requirements
To use ScriptMate effectively, adhere to the following folder structure conventions:
-
Menus:
- Any folder prefixed with menu_ creates a new context menu.
- The menu name is derived from the folder name, replacing underscores with spaces.
- Example: A folder named menu_NewUserMenu creates a menu called New User Menu.
-
Submenus:
- Subfolders prefixed with sub_ create submenus within their parent menu.
- The submenuâs name is derived from the folder name, replacing underscores with spaces.
- Example: A folder named sub_Development_ModelingTools creates a ModelingTools submenu under a Development menu.
-
Script Files:
- Python scripts must be wrapped in a specific template to ensure compatibility.
- The template must include:
OPERATOR["name"]
determines the scriptâs display name in the menu.OPERATOR["category"]
groups the script into a specific submenu if applicable.
Features
-
Dynamic Menu and Script Organization:
- Automatically scans directories and organizes scripts into
menus
andsubmenus
based on folder structure.
- Automatically scans directories and organizes scripts into
-
Default Main Menu:
- If a folder or script is not within a menu_ directory, it will appear in the default top-level menu (
crudo | ScriptMate
) in Mayaâs main menu bar.
- If a folder or script is not within a menu_ directory, it will appear in the default top-level menu (
-
Script and Folder Ignoring:
- Any file or folder prefixed with __ will be ignored by the plugin.
- Example:
__IgnoreThisMenu
or__hidden_script.py
will not be loaded.
-
Preferences:
- Supports defining separate local script directories (private scripts) and global network directories (shared scripts visible to the team).
-
Hot-Reloading:
- Scripts and menus can be updated without restarting Maya. Simply press the Update Scripts button in the pluginâs settings.
Examples
Folder Structure:
DirectoryscriptLibrary
Directorymenu_Tools
- script_cleanScene.py
Directorysub_Modeling
- script_optimizeMesh.py
- __menu_IgnoreThisMenu
Directorysub_Testing_Category
- __script_hiddenScript.py
- script_test.py
Resulting Menu Layout in Maya:
- Tools:
- Clean Scene
- Modeling:
- Optimize Mesh
- crudo | ScriptMate:
- Testing:
- Debug Tool
- Testing:
The menu IgnoreThisMenu
and script hidden.py
will be ignored because they are prefixed with __
.