Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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?

What I have tried:

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).
Posted
Updated 7-Dec-18 5:23am
v3

1 solution

You need to go back to the documentation for PySide2 to see what its requirements are. Also this sounds like quite a complex project for someone who is new to Python. Your time would be better spent learning the basics first. There are excellent tutorials at Welcome to Python.org[^].
 
Share this answer
 
Comments
Richard MacCutchan 7-Dec-18 10:51am    
I don't see how you can possibly work with third party software if you do not know where to find the documentation.

PySide2 - Google Search[^]

3ds python - Google Search[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900