I've been trying to configure VSCode as an IDE for 3ds max python. So far, I've gotten execution and linting to work, The only piece thats missing is autocompletion/Intellisense.
So what ive done is changed the Python interpreter from the original one to C:\Program Files\Autodesk\3ds Max 2018\3dsmaxpy.exe. I then installed pip using this interpreter, and used that pip to install pylint. I know it works because if i do for example
import MaxPlus<br>MaxPlus.blah
it throws an error, but if i do
import MaxPlus<br>MaxPlus.Asset
it recognizes it as a valid command. So clearly the linter is capable of accessing the Max modules properly.
autocompletion of code doesnt work though. For example Ctrl+Space on MaxPlus. just suggest previously used snippets in the .py file. Ive also been unable to get autocompletion to work for standard python modules.
The hinge seems to be the interpreter. If i use the standard 2.7 interpreter from /python27 I get autocompletion and intellisense for all standard libraries, but im not able to import any of the 3ds Max modules (MaxPlus for example) in to my script. If i change to the 3dsmaxpy.exe interpreter, then I can correctly import MaxPlus, but i dont get any autocompletion on any modules.
Replies
If not maybe the guys over at CGSociety Max forum can help you out.
- I turned on "Python Server" when prompted, I believe this is a new method of handling autocomplete/linting?
- I also turned on pylint, unsure if that was necessary.
- Changed the interpreter to ...3dsmaxpy.exe
- I am on 3dsmax 2019
How did you added the intpreter in vs code?
I'tried this
There is no way it work
MaxPlus autocompletion works on my side with the following settings.json
I hope it helps