Found a workaround for this! I remembered that not too long ago I had to figure out how to send a value to a Max UI spinner that was likewise not exposed to script, and I could use that as the basis for the solution here. It's hacky and totally horrible, but c'est la Maxscript, I suppose.
Assuming you have an object 'obj' with an Unwrap_UVW modifier on it, and the editor window is already open:
(
local uvwEditorHwnds = UIAccessor.GetChildWindows obj.Unwrap_UVW.EditorHwnd
local autoPackCheckBox = (for hwnd in uvwEditorHwnds where (UIAccessor.GetWindowResourceId hwnd == 45336) collect hwnd)[1]
if (autoPackCheckBox != undefined) then
(
local BM_SETCHECK = 0x00f1
local BST_UNCHECKED = 0x0000
Windows.SendMessage autoPackCheckBox BM_SETCHECK BST_UNCHECKED 0
UIAccessor.CloseDialog obj.Unwrap_UVW.EditorHwnd
obj.Unwrap_UVW.Edit()
)
)
Checking the SDK documents, the checkbox for the 'auto pack' option (labeled in the UI as 'avoid overlap') has a fixed resource ID of 45336, so we need to find that Hwnd child of the UVW Editor window. We can use the Windows messaging system to send a 'uncheck' message to that button, which will always force the button off (i.e. it's not just a toggle operation, the checkbox will always wind up in the clear/unchecked state afterwards.) However, there is a wrinkle - as soon as the UVW Editor window regains focus, the state will immediately reset to whatever the previous state was (so the message we pass it evidently only changes the visual state, not the underlying viewmodel-equivalent state underpinning it.) If we close the UVW Editor window immediately, though, that seems to bake down the value of the view, as the next time we open up the window, it will have our desired value of 'unchecked'. Maybe one day we'll be able to just toggle this off via a simple boolean property on the modifier, but until then I hope this helps someone else!