carson-katri / dream-textures

Stable Diffusion built-in to Blender
GNU General Public License v3.0
7.78k stars 418 forks source link

Blender 4.0 and Command Line Rendering Fixes #745

Closed NullSenseStudio closed 8 months ago

NullSenseStudio commented 10 months ago

Prevents deadlocks by checking when sections are running on the main thread to continue executing on the same thread rather than registering a timer and waiting on that. Forces requests to the subprocess to run in blocking mode while command line rendering is occurring, and since forcing blocking mode makes the returned Future complete before callbacks get added the done/exception callbacks will run immediately in that case.

NullSenseStudio commented 10 months ago

Forgot to mention that I've made it cut down on some spam caused by the backend default not existing when you don't have any extra backend installed, and fixed a couple of issues for running on Blender 4.0 too.