Setup PyCharm 3dsMax?

Does anyone know why pycharm can’t recognize 3dsmaxpy as interpeter ?
I’m using 3dsmax 2018 and want to setup pydev-env, but i got this strange error.

error_pycharm_3dsmaxpy

I don’t know exactly, because I don’t use PyCharm. I can say, though, that I have set up a custom Python environment for 3ds Max 2018 in both Visual Studio 2017 and Wing 6. So it is possible.

Went down this rabbit hole a while back. If I recall correctly, I was able to get it to work by duplicating 3dsmaxpy.exe and renaming it to python.exe.

1 Like

If you just want autocomplete for MaxPlus:

Go to the 3ds max installation directory.
Copy the MaxPlus.py,_MaxPlus.pyd and all .dll’s in the directory to another folder.
Add that folder to your %PYTHONPATH%

In case you’re wondering if you need all 400 DLLs…No you don’t but the _MaxPlus.pyd has 50 Dependencies and copying all of them is annoying. (You can write a dependency walker in python using the pefile module from PyPi)

Alternatively you can try using the following list which I just generated from the depencies of the 2018 version (write a python script to move them): https://hastebin.com/tajokeruwo.json

After that restart PyCharm. It should start generating Binary Skeletons for the files.

1 Like

Instead of duplicating and renaming 3dsmaxpy.exe to python.exe and possibly having issues with multiple interpreters running, it’s probably safer to just create a symbolic link (if you’re in Windows). This will generate what is essentially a shortcut, so you would have a symbolic link (commonly abbreviated to “symlink”) then called “python.exe” which is actually pointing to “3dsmaxpy.exe”, so that both Max and your IDE are running the same interpreter. Then you just point your IDE’s interpreter to the symbolic link called “python.exe”.

Microsoft documentation on the “mklink” command:

You can find how-tos on making symbolic links in Windows from the command line, like this one:

@TAZORN – if you prefer the second solution here you can mark it as the ‘correct’ one using the … menu under the answer you prefer and choosing the checkbox icon

i made a plug-in that adds support for 3dsmaxpy to PyCharm

http://rightsomegoodgames.ca/downloads/3dsMaxPy_plugin.jar

i also added a pull request to the official pycharm repo for the fix as well so it can eventuality be included out of the box.


https://youtrack.jetbrains.com/issue/PY-26863

1 Like