feat(ui): add dedicated cancel button for batch rendering
This commit is contained in:
11
panel.py
11
panel.py
@@ -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')
|
||||
Reference in New Issue
Block a user