Code: Select all
actionMan.executeAction 982383860 "2642"
I'm writing a tool to bake textures and was able to automate everything else, except this one step

Code: Select all
actionMan.executeAction 982383860 "2642"
Code: Select all
fn closeOctaneViewport = (
local hwnd = dialogMonitorOps.GetWindowHandle()
local children = UIAccessor.GetChildWindows hwnd
for child in children do (
local windowTitle = (UIAccessor.GetWindowText child)
if matchPattern windowTitle pattern:"OctaneRender Viewport *" ignoreCase:false do (
UIAccessor.CloseDialog child
exit
)
)
)
Code: Select all
OctaneMaxFPI.ViewportSetWindowState(0)