feat(ui): add dedicated cancel button for batch rendering

This commit is contained in:
2026-06-02 23:07:09 +02:00
parent d1a5655464
commit 634700e4db
3 changed files with 21 additions and 1 deletions

View File

@@ -27,4 +27,13 @@ class SCENERENDERER_PT_panel(bpy.types.Panel):
layout.separator()
row = layout.row(align=True)
row.scale_y = 2.0
row.operator("scenerenderer.render_all", text="Render All Scenes", icon='RENDER_STILL')
# Check if rendering is running by accessing the timer on the operator
from .operators import SCENERENDERER_OT_render_all
is_running = getattr(SCENERENDERER_OT_render_all, "_timer", None) is not None
if is_running:
row.operator("scenerenderer.cancel_batch", text="Cancel Batch Render", icon='CANCEL')
layout.label(text="Press ESC to force stop the active frame.", icon='INFO')
else:
row.operator("scenerenderer.render_all", text="Render All Scenes", icon='RENDER_STILL')