Announcements

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

@pycharm : "3dsmaxpy.exe >> Not a valid home for Python SDK"

Anonymous

@pycharm : "3dsmaxpy.exe >> Not a valid home for Python SDK"

Anonymous
Not applicable

Hello,

Starting working with 3dsmax 2017 and new python script integration.

I use to work with Maya, then pycharm to write scripts.
Usually the ".../Maya2016/bin/mayapy.exe" file works fine with pycharm.

 

But the ".../3ds Max 2017/3dsmaxpy.exe" file provided leads to an error with pycharm (see attached screen).

Any idea how to correctly setup a pycharm project for 3dsmax python use?



Thanks by advance! ^_-



PS : this is PyCharm software : https://www.jetbrains.com/pycharm/

Reply
2,756 Views
7 Replies
Replies (7)

Anonymous
Not applicable

Actually even with the python27.dll from the install root folder, it doesn't work 😞 ....
(see attached picture)

0 Likes

Anonymous
Not applicable

I emailed with Kevin Vandecar (Media & Entertainment Manager @ Autodesk) and he responded with:

 

Hi Martin, Very sorry, but we were not able to get it working with 3ds Max 2017. Product team decided to make a custom version of python, complete with renaming the executable. This causes PyCharm to apparently be confused. I also tried renaming the executable, but then it is not run properly by 3ds Max, as it seems to be hardcoded into exe. We have reported it to engineering. So far, I have had only a couple complaints about it, but I suspect it is just starting to become bigger issue. I also saw recently another complaint here: https://forums.autodesk.com/t5/3ds-max-programming/pycharm-quot-3dsmaxpy-exe-gt-gt-not-a-valid-home-... I will check with engineering to see if they have any news. Sory for the trouble. Kevin

 

So hopefully support will come in the future.

0 Likes

Anonymous
Not applicable

If you want to run code from PyCharm you could use MaxConnect as in this example: https://github.com/ADN-DevTech/3dsMax-Explode-Geometry/tree/master/Python but debugging doesn't work unfortunately

0 Likes

Anonymous
Not applicable
That's sound a bumch of fun..... 😄
I'll have a try on Monday, thanks!
0 Likes

Anonymous
Not applicable

Do you know if there's a timeframe for this?

0 Likes

Anonymous
Not applicable

Duplicate 3dsmaxpy.exe as python.exe in the main directory.

Pycharm will allow it then.

 

However, I found that the script fails in Pycharm when you run it but… it works using debug.

 

The error is 

  File "_ctypes/callbacks.c", line 314, in 'calling callback function'
  File "C:\Dev\bin\YCDIVFX_MaxPlus-master\packages\maxconnect\tomax.py", line 197, in _getWindows
    attachThreads(gMainWindow)
  File "C:\Dev\bin\YCDIVFX_MaxPlus-master\packages\maxconnect\tomax.py", line 176, in attachThreads
    thread = GetWindowThreadProcessId(hwnd, 0) #max thread
WindowsError: exception: access violation writing 0x00007FFF00000000
Could not find MAXScript Macro Recorder

Perhaps someone could shed some light on that?

 

George

0 Likes

Anonymous
Not applicable

I traced the issue and added a couple of line to packages\maxconnect\tomax.py to correct the ropey execution:

 

See https://github.com/ycdivfx/YCDIVFX_MaxPlus/issues/3 for details

 

I hope this helps someone.

 

George

 

 

0 Likes