-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathui.py
More file actions
30 lines (20 loc) · 732 Bytes
/
ui.py
File metadata and controls
30 lines (20 loc) · 732 Bytes
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
import bpy
# UI Panels for displaying propertis of this addon
class RENDER_PT_properties(bpy.types.Panel):
bl_idname = "BPR_PT_Render_Properties"
bl_label = "Samples"
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = 'render'
@classmethod
def poll(cls, context):
# only show this banel if BPR is selected
return context.engine == 'BPR'
def draw(self, context):
cycles_settings = context.scene.cycles
self.layout.prop(cycles_settings, 'samples')
self.layout.prop(cycles_settings, 'max_bounces')
def register():
bpy.utils.register_class(RENDER_PT_properties)
def unregister():
bpy.utils.unregister_class(RENDER_PT_properties)