Notifications
Clear all
[Closed] MXS pickObject method. SDK implementation?
Nov 09, 2021 3:01 am
I understand that PickModeCallback is being used … possibly in conjunction with PickNodeCallback.
but how does MXS perform the “wait a pick or cancel”?
pickObject method stops script execution and waits for a pick. Anyone has an idea how this is done in the SDK?
3 Replies
Nov 09, 2021 3:01 am
It just enters in a while loop until user selects something or cancel it with a key press.
Don’t know if it is possible to debug maxscript.dll with AD debug symbols from VS, but you could use .pdb in IDA PRO + HexRays to see the sources of pick_object_cf.
Nov 09, 2021 3:01 am
Thanks!
The funny thing I already did it in one of my tools
MSG wmsg;
while (GetMessage(&wmsg, NULL, 0,0))
{
if (wmsg.message == WM_KEYUP && (TCHAR)wmsg.wParam == VK_ESCAPE)
end_track_mouse = TRUE;
else if (wmsg.message == WM_KEYUP || wmsg.message == WM_KEYDOWN)
continue;
else if (wmsg.message != WM_RBUTTONUP) // ignore rmousebuttonup's - they mess focus
max_ip()->TranslateAndDispatchMAXMessage(wmsg);
if (end_track_mouse)
break;
}
this code snippet is from “mousetrack.cpp”