-
Notifications
You must be signed in to change notification settings - Fork 50
/
cos_ui.py
46 lines (36 loc) · 1.33 KB
/
cos_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
36
37
38
39
40
41
42
43
44
45
46
import bpy
# camera on sphere ui class
class COS_UI(bpy.types.Panel):
'''Camera on Sphere UI'''
bl_idname = 'VIEW3D_PT_cos_ui'
bl_label = 'Camera on Sphere COS'
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
bl_category = 'BlenderNeRF'
bl_options = {'DEFAULT_CLOSED'}
def draw(self, context):
layout = self.layout
scene = context.scene
layout.alignment = 'CENTER'
layout.use_property_split = True
layout.prop(scene, 'camera')
layout.prop(scene, 'sphere_location')
layout.prop(scene, 'sphere_rotation')
layout.prop(scene, 'sphere_scale')
layout.prop(scene, 'sphere_radius')
layout.prop(scene, 'focal')
layout.prop(scene, 'seed')
layout.prop(scene, 'cos_nb_frames')
layout.prop(scene, 'upper_views', toggle=True)
layout.prop(scene, 'outwards', toggle=True)
layout.use_property_split = False
layout.separator()
layout.label(text='Preview')
row = layout.row(align=True)
row.prop(scene, 'show_sphere', toggle=True)
row.prop(scene, 'show_camera', toggle=True)
layout.separator()
layout.use_property_split = True
layout.prop(scene, 'cos_dataset_name')
layout.separator()
layout.operator('object.camera_on_sphere', text='PLAY COS')