Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blender 4.0 and Command Line Rendering Fixes #745

Merged
merged 2 commits into from
Jan 14, 2024

Conversation

NullSenseStudio
Copy link
Collaborator

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.

@@ -18,6 +19,7 @@ class DreamTexturesRenderEngine(bpy.types.RenderEngine):
bl_label = "Dream Textures"
bl_use_preview = False
bl_use_postprocess = True
bl_use_gpu_context = actor.main_thread_rendering
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason bl_use_gpu_context = True allows for rendering annotations in background mode, but freezes under normal use. And bl_use_gpu_context = False works fine under normal use, but freezes while in background mode. So bl_use_gpu_context = actor.main_thread_rendering is the best that I'll get this to work.

@NullSenseStudio NullSenseStudio linked an issue Nov 16, 2023 that may be closed by this pull request
@NullSenseStudio
Copy link
Collaborator Author

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.

@NullSenseStudio NullSenseStudio changed the title Fix Command Line Rendering Blender 4.0 and Command Line Rendering Fixes Dec 17, 2023
@NullSenseStudio NullSenseStudio linked an issue Dec 17, 2023 that may be closed by this pull request
@carson-katri carson-katri merged commit 26b842c into main Jan 14, 2024
@carson-katri carson-katri deleted the command-line-rendering branch January 14, 2024 15:16
CyWP added a commit to CyWP/dream-forge that referenced this pull request Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

error when clicking generate V3.0 with SDXL command line rendering broken
2 participants