-
-
Notifications
You must be signed in to change notification settings - Fork 106
Expand file tree
/
Copy pathrender.py
More file actions
46 lines (33 loc) · 1.49 KB
/
Copy pathrender.py
File metadata and controls
46 lines (33 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import bpy
from ..properties.denoiser import LuxCoreDenoiser
from ..properties.display import LuxCoreDisplaySettings
class LUXCORE_OT_request_denoiser_refresh(bpy.types.Operator):
bl_idname = "luxcore.request_denoiser_refresh"
bl_label = "Refresh Denoiser"
bl_description = "Update the denoised image (takes a few seconds to minutes, progress is shown in the status bar)"
def execute(self, context):
LuxCoreDenoiser.refresh = True
return {"FINISHED"}
class LUXCORE_OT_request_display_refresh(bpy.types.Operator):
bl_idname = "luxcore.request_display_refresh"
bl_label = "Refresh Image"
bl_description = "Update the rendered image"
def execute(self, context):
LuxCoreDisplaySettings.refresh = True
return {"FINISHED"}
class LUXCORE_OT_toggle_pause(bpy.types.Operator):
bl_idname = "luxcore.toggle_pause"
bl_label = ""
bl_description = "Pause/Resume render"
def execute(self, context):
LuxCoreDisplaySettings.paused = not LuxCoreDisplaySettings.paused
return {"FINISHED"}
class LUXCORE_OT_stop_render(bpy.types.Operator):
bl_idname = "luxcore.stop_render"
bl_label = "Stop the render?"
bl_description = "Stop the render and run compositing"
def invoke(self, context, event):
return context.window_manager.invoke_confirm(self, event)
def execute(self, context):
LuxCoreDisplaySettings.stop_requested = True
return {"FINISHED"}