Python Forum
How to set up visual studio 2017 for 3ds max Python development - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: How to set up visual studio 2017 for 3ds max Python development (/thread-14577.html)



How to set up visual studio 2017 for 3ds max Python development - littleGreenDude - Dec-07-2018

I'm trying to configure my visual studio (2017) development environment so it will allow me to debug Python scripts that are written for 3ds Max (2018).

Please note, 3ds Max using Python 2.7.12 for scripting.

The more specific or detailed problem I am having has to do with Qt and PySide2. If you look at a python example provided by 3ds, for me it is in this folder:

C:\Program Files\Autodesk\3ds Max 2018\scripts\Python

and the file is called:

demoPySideQWidget.py

at the top of the file, it imports QtCore and QtWidgets from PySide2. This demo runs fine and displays the dialog when running from the 3ds script editor.

From the Visual Studio side, I can't get the PySide2 packages to install. It looks like they aren't compatible with Python 2.7, when trying to add the package, it shows Install PySide2 (5.11.2) as an option, but selecting it yields the following:

----- Installing 'PySide2==5.11.2' -----
Collecting PySide2==5.11.2
Could not find a version that satisfies the requirement PySide2==5.11.2 (from versions: )
No matching distribution found for PySide2==5.11.2
----- Failed to install 'PySide2==5.11.2' -----


To summarize, the question is:

How to best configure the Visual Studio 2017 environment to work with the Python development constraints imposed by 3ds Max 2018?


Current configuration/setup within VS -

I've set up a custom python environment in VS, with the following configuration options:

Description: "3ds Max 2018 Python"

Prefix path: "C:\Program Files\Autodesk\3ds Max 2018"

Interpreter path: "C:\Program Files\Autodesk\3ds Max 2018\3dsmaxpy.exe"

I didn't set the following, but it defaulted.

Windowed interpreter: "C:\Program Files\Autodesk\3ds Max 2018\3dsmaxpy.exe"

Language version: "2.7"

Architecture: "64-bit"

Path environment variable: MAXPYTHONPATH

The MAXPYTHONPATH is a user defined environment variable that includes 3ds max folders (python and script sub-folders).


RE: How to set up visual studio 2017 for 3ds max Python development - littleGreenDude - Dec-27-2018

I ended up bailing on this (Visual Studio) approach and went with PyCharm.

I added QtDesigner and Pyuic as external tool calls and so far, this seems to be a pretty good IDE.