This is an update on my YCDIVFX MaxPlus Packages which removes a dependency on ExternalMaxscriptIDE. Now thanks to the brilliant work of Christoph Bülter and his SublimeMax package, we can execute our python scripts in 3ds Max directly from Python without too much hassle, way easier to setup. Don’t be scared with all the bullet points, I’ve tried explain it almost click by click.
I basically deleted code from SublimeMax to make it fit to the simple requirements of run.py and PyCharm.
This should make the setup for PyCharm and 3dsmax much easier, here’s an update on the step-by-step:
- Install PyCharm- http://www.jetbrains.com/pycharm/download/index.html
- Download the YCDIVFX MaxPlus Packages and unzip it to a folder of your choice (ex. C:YCDIVFXMaxPlus)
- Open PyCharm and open the directory where you unzipped the previous file.
- Go to File -> Settings or press Alt+F7 and search for Project Interpreter
- Your default project interpreter should be Python 2.7.3 bundled with 3ds Max (C:/Program Files/Autodesk/3ds Max 2014/python/python.exe) if not, don’t worry go to the next step.
- Click Configure interpreters and if you don’t have an interpreter set, click the + button and add your Python interpreter (C:/Program Files/Autodesk/3ds Max 2014/python/python.exe)
- With the project interpreter selected on the top list view, click on the Paths tab.
- Click the + button and add your default 3dsmax 2014 root folder (C:/Program Files/Autodesk/3ds Max 2014) if it doesn’t show up there already.
- Go to Project Structure and on the right pane, select the “packages” folder and press “Sources” button.
- Press OK
Now let’s setup one configuration and then you can duplicate this one to run other scripts:
- Press Run -> Edit Configurations
- Fill in with the following values – Script: C:YCDIVFXMaxPlusMyExamplesrun.py / Script parameters: -f C:YCDIVFXMaxPlusmain.py
- Press OK
Now open 3dsmax 2014.
In PyCharm just select “run main” and press the Run button (little green play button)
In the 3ds Max Listener you should see this:
Congratulations, you’ve made it!
You can also run it from the command-line, be sure to check the README file.
Recommended optional installs (distribute, pip, nose and coverage):
- PyCharm settings on the Python Interpreters page, you should see a warning to install “distribute”, click on it and then another for “pip”, install that too.
- Now click the Install button and search for “nose”, install “nose” package (Description: nose extends unittest to make testing easier/Author:Jason Pellerin)
- Now search and install “coverage” package.
If you are interested in remote debugging, check my other blog post here: Pycharm, 3dsmax, remote debugging love!