Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Could not find MAXScript Macro Recorder' in 3dsMax2017 #3

Open
Finetuned opened this issue Nov 14, 2017 · 1 comment
Open

'Could not find MAXScript Macro Recorder' in 3dsMax2017 #3

Finetuned opened this issue Nov 14, 2017 · 1 comment

Comments

@Finetuned
Copy link

I've configured maxconnect in PyCharm by duplicating 3dsmaxpy.exe as python.exe.
This resolves the issue as described on the Autodesk forums

The script mostly fails to find the mini listener except when using debug:

  • running from the command line fails 100% of the time.
  • running run.py works around 50% of the time.
  • debugging run.py works 100% of the time
  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

Process finished with exit code 0
@Finetuned
Copy link
Author

I traced the issue to attachThreads(hwnd) in packages/maxconnect/tomax.py and added:

  lpdw_process_id = ctypes.c_ulong()

then updated the second arg from 0 to:

   thread = GetWindowThreadProcessId(hwnd, ctypes.byref(lpdw_process_id)) #max thread

ref

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant