[Closed] Set image format in Make Preview
I’m creating a script to make previews for multiple cameras and want to use the Make Preview, I know i can access a few things with maxscript using the createPreview method, but there are things that i cant do with that, I also tried just capturing the viewport and that works but I’m limited to the viewport resolution, So my only option is to use UIAccessor .
I have been searching the forum for a while and i can set almost all settings, but what i can’t figure out is the image format. Using the following code it appears that it selects jpg but it does not.
To try it, before using the script open the make preview, select custom file type and select any other format then jpg then run the script and click file, you will see jpg is set but if you click save the previous format is still selected, Em i missing something? any tips appreciate.
Thanks,
Guillemro
(
BM_CLICK = 0xF5
CB_SETCURSEL = 0x014EdialogMonitorOPS.UnRegisterNotification id:#monitorpreviewsettings
DialogMonitorOPS.enabled = true
DialogMonitorOPS.Interactive = offDialogMonitorOPS.ShowNotification()
fn makePreviewSettings =
(
hwnd = DialogMonitorOPS.GetWindowHandle()
hwnd_title = UIAccessor.GetWindowText hwndformat "hwnd_title: %\n" hwnd_title chilHw = windows.getChildrenHWND hwnd -- Image Sequence stuff -------------------------------- if (hwnd_title == "Create Animated Sequence File...") then ( uiaccessor.sendMessage chilHw[15][1] BM_CLICK 0 0 windows.sendmessage chilHw[15][1] CB_SETCURSEL 7 0 -- JPG ) true
)
clearListener()
dialogMonitorOPS.RegisterNotification makePreviewSettings id:#monitorpreviewsettings
max preview
dialogMonitorOPS.UnRegisterNotification id:#monitorpreviewsettings
dialogMonitorOps.enabled = false)
Found the solution on another script by James Cleaveland, below is the code that works in case some one else need it.
Basically it was the button down.
Guillermo
(
BM_CLICK = 0xF5
CB_SETCURSEL = 0x014E
WM_LBUTTONDOWN = 0x0201dialogMonitorOPS.UnRegisterNotification id:#monitorpreviewsettings
DialogMonitorOPS.enabled = true
DialogMonitorOPS.Interactive = offDialogMonitorOPS.ShowNotification()
fn makePreviewSettings =
(
hwnd = DialogMonitorOPS.GetWindowHandle()
hwnd_title = UIAccessor.GetWindowText hwndformat "hwnd_title: %\n" hwnd_title chilHw = windows.getChildrenHWND hwnd -- Image Sequence stuff -------------------------------- if (hwnd_title == "Create Animated Sequence File...") then ( uiaccessor.sendmessage chilHw[15][1] WM_LBUTTONDOWN 0 0 windows.sendmessage chilHw[15][1] CB_SETCURSEL 7 0 -- JPG UIAccessor.PressButton chilHw[17][1] ) true
)
clearListener()
dialogMonitorOPS.RegisterNotification makePreviewSettings id:#monitorpreviewsettings
max preview
dialogMonitorOPS.UnRegisterNotification id:#monitorpreviewsettings
dialogMonitorOps.enabled = false)