forked from maximeraafat/BlenderNeRF
-
Notifications
You must be signed in to change notification settings - Fork 0
/
blender_nerf_ui.py
35 lines (26 loc) · 952 Bytes
/
blender_nerf_ui.py
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
import bpy
# blender nerf shared ui properties class
class BlenderNeRF_UI(bpy.types.Panel):
'''Blender x NeRF UI'''
bl_idname = 'panel.blender_nerf_ui'
bl_label = 'Blender x NeRF shared UI'
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
bl_category = 'BlenderNeRF'
def draw(self, context):
layout = self.layout
scene = context.scene
layout.alignment = 'CENTER'
row = layout.row()
row.prop(scene, 'train_data', toggle=True)
row.prop(scene, 'test_data', toggle=True)
if not (scene.train_data or scene.test_data):
layout.label(text='Nothing will happen!')
else:
layout.prop(scene, 'aabb')
if scene.train_data:
layout.separator()
layout.prop(scene, 'render_frames')
layout.separator()
layout.use_property_split = True
layout.prop(scene, 'save_path')