Josh Buck | (c)2011 | www.cgartistry.com
jbMaya Python is provided free of charge and is free to use. If you find it useful please consider donating to help fund further development. Or... if you'd rather buy me a beer, indicate that donated funds are for purposes of "beer" and I personally guarantee their allocation as such. Cheers!
Please send bugs, comments and suggestions for features and/or improvements to firstname.lastname@example.org
Notepad++ is a simple, clean, light and deadly powerful text editor. If you've tried to create Python scripts for Maya in an external editor like NP++ you've probably had to choose between syntax highlighting for MEL or syntax highlighting for Python. j Maya Python provides language definition with syntax highlighting and autocomplete for both Maya and Python.
Instructions for use:
- Copy the jbMayaPython.xml file into the plugins\APIs folder of your Notepad++ installation. Location should be something similar to:
C:\Program Files (x86)\Notepad++\plugins\APIs
- Copy the userDefineLang.xml file into your %appdata%\Notepad++ folder. Location should be something similar to:
Note : if you have existing user defined languages that you already created for Notepad++ you will need to merge the content of this version of userDefineLang.xml with the existing one. Failure to merge will result in the loss of existing custom language definitions.
- Open Notepad++ and the .py file that you wish to edit. Under the 'Language' tab jbMayaPython should now be an option. Select this option to activate sytax highlighting.
- To enable full autocompletion go to 'Settings -> Preferences' and select the 'Backup/Auto-Completion' tab. Check 'Enable auto-completion on each input', 'Function Completion' and 'Function parameters hint on input'.
- To be safe with Python, it's also a good idea while still in 'Preferences' to go to the 'Language/Tab Settings' tab and check 'Replace by space.' This will help prevent tab/space issues that are common with Python indentation.
jbMaya Python Syntax Coloring:
Python : green
Maya : light blue
Comments (#) : red
Text/String : brown
Maya cmds : dark blue
To change syntax coloring:
- In Notepad++ go to 'View -> User Defined Dialogue...'
- Select 'jbMayaPython' from the 'User language' drop down at the top of window
- Change the colors in the 'Keyword Lists' and 'Comment & Number' tabs as desired. The colors update in real-time as you make changes. This automatically updates your userDefineLang.xml file.
To add to the Keyword Lists:
- While in the User Defined Language window, add new Maya/MEL syntax to the 2nd Group.
- Add Python syntax to the 3rd Group.
- Add Maya cmds to the 4th group (only contains cmd and cmds by default)