Preprocessing preview on Mac LW 2020.0.2

slacer

Active member
I tried some Global Illumination scenes on my windows machine and wanted to see how my M1 Mac mini performs with the same scenes.
During the preprocessing phase there was no refresh in the preview window on the Mac and I could only force a refresh by resizing the window using the mouse.

The same is true for my Intel Mac book pro. Both Macs run Monterey 12.3

I don't know if this is a known issue, but I don't expect a fix, because I did not send a related bug report.

But I wrote a small AppleScript to solve this problem:

AppleScript:
tell application "Layout"
    activate
end tell

tell application "System Events"
    set frontAppProcess to first application process whose frontmost is true
end tell

tell frontAppProcess
    set window_name to name of front window
    set ss to get size of front window
    copy (ss) to {x, y}
    repeat until false
        set size of front window to {x + 5, y}
        delay 1
        set size of front window to {x, y}
        delay 1
    end repeat
    
end tell

It requests the size of the top most window belonging to the Layout application. Its width and height depends on your preview settings.
This means you need to start your global illumination baking or your scene rendering before you run the script.

This script widens and restores the window size by 5 pixels, and enforces the required refresh.

Maybe you need to allow the script to control your application, but you can do this from the system preferences.
Just give it a try using the ScriptEditor if you want to test it.
 
Last edited:
Back
Top