run python script from notepad++ for maya 2011
notepad++ as a script editor deals better with indent, block comment toggle, replace, find, similar text highlighting etc comparing to the native maya script editor.
there are existing product out there called mapy for maya but I couldn’t get it to work in maya 2009/2011
so here is my setup to run python script from notepad++ for maya 2011
1. usersetup.py (anything here will run when maya starts)
if cmds.commandPort(':7777', q=True) !=1: cmds.commandPort(n=':7777', eo = False, nr = True) sys.path.append("C:\mayanotepad") writeFile = open(r'C:\mayanotepad\testrun.py', "w") writeFile.close() import testrun
2. unzip the following file in c:
mayanotepad.zip
3. notepad++ > run > run (or press F5)
C:\mayanotepad\send.bat "$(FULL_CURRENT_PATH)"
note:
all vars and def will reside in “testrun” namespace
save file required before run
note2:
for step 3, type and replace the double quote as wordpress replace double quotes in posts 2013/05/16 update fixed
I keep getting errors. What is the purpose of this script, anyway? I don’t understand what it does.
Nevermind. I figured it out. I see what you’re doing here. NIce!
This works great alongside RunMe, which you can download here http://sites.google.com/site/fstellari/nppplugins All I have to do now is hit F5 and my Python scripts are sent to Maya.
Is it possible a more deep instruction?
I don’t get where to place usersetup.py, what i need to place in “$(FULL_CURRENT_PATH)” and what mean by “wordpress replace double quotes”
userSetup.py
1. windows – navigate to Documents / Maya / 2011-x64 / scripts (substitute 2011-x64 with your current Maya version)
2. open userSetup.py (if file doesn’t exists, create a new file named userSetup.py)
3. append the script in the post to the file
setup program to run in notepad++
1. in notepad++ > run > run (or press F5)
2. copy and paste the full line in the post (assuming that you unzip step 2 to a folder named mayanotepad under c drive) to the box that says “The Program to Run”