Community
3ds Max Programming
Welcome to Autodesk’s 3ds Max Forums. Share your knowledge, ask questions, and explore popular 3ds Max SDK, Maxscript and Python topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Debugging 3ds Max Python code from VS Code

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
mustafapassahci
1523 Views, 3 Replies

Debugging 3ds Max Python code from VS Code

I am trying to run this example.https://help.autodesk.com/view/MAXDEV/2022/ENU/?guid=MAXDEV_Python_tutorials_creating_the_dialog_htm...

 

Everything works fine until "Wait, I see problems with my import statements" section.

Even if I follow those steps, I am still seeing import error, like this:

mustafapassahci_0-1643876933376.png

Is this normal case? I tried to change "python interpreter" to the max's python with this way:

mustafapassahci_1-1643877073481.png

and then my problem disappears but this time vs code can't detect PySide2 module:

mustafapassahci_2-1643877244733.png

plus pyside's "autocomplete" tool is gone. I can't see pymsx's intellisense either way.
I added this code in settings.json but example using 2021's path. Should I install max 2021?

 

 

 

 

"python.pythonPath": "C:\\Program Files\\Autodesk\\3ds Max 2022\\Python37\\python.exe",
"python.autoComplete.extraPaths": ["C:\\Program Files\\Autodesk\\3ds Max 2022\\Python37"]

 

 

 


at the end I want to see this in vs code as well:

mustafapassahci_3-1643877635982.png

Labels (5)
3 REPLIES 3
Message 2 of 4
458569
in reply to: mustafapassahci

Hello Mustafa,

Thanks a lot for reporting this. I juste tried it on my side and to make it work I had to set it this way:

"python.autoComplete.extraPaths": ["C:\\Program Files\\Autodesk\\3ds Max 2022\\Python37\\Lib\\site-packages"]

Does this solve the issue for you? (if it does I will make sure the doc is updated accordingly).

Thanks again

Hugo

Message 3 of 4
mustafapassahci
in reply to: 458569

Import error disappeared but intellisense still doesn't appear. Is it normal for it not to appear?

mustafapassahci_1-1644258252660.png

 

 

my settings.json:

mustafapassahci_2-1644258329313.png

 

my interpreter:

mustafapassahci_4-1644258360194.pngmustafapassahci_5-1644258370250.png

 

Message 4 of 4
458569
in reply to: mustafapassahci

Hello Mustafa,

You should see a few things like animate (like... pymxs.an should suggest autocompletion).

This is the only thing that will currently work.

So it is "normal" (I should probably use the word "expected") that pymxs.ru does not suggest autocomplete to "runtime".

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report