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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
# gpl authors: nfloyd, Francesco Siddi
from bpy.types import PropertyGroup
from bpy.props import (
BoolProperty,
BoolVectorProperty,
CollectionProperty,
FloatProperty,
FloatVectorProperty,
EnumProperty,
IntProperty,
IntVectorProperty,
PointerProperty,
StringProperty,
)
class POVData(PropertyGroup):
distance: FloatProperty()
location: FloatVectorProperty(
subtype='TRANSLATION'
)
rotation: FloatVectorProperty(
subtype='QUATERNION',
size=4
)
name: StringProperty()
perspective: EnumProperty(
items=[('PERSP', '', ''),
('ORTHO', '', ''),
('CAMERA', '', '')]
)
lens: FloatProperty()
clip_start: FloatProperty()
clip_end: FloatProperty()
lock_cursor: BoolProperty()
cursor_location: FloatVectorProperty()
perspective_matrix_md5: StringProperty()
camera_name: StringProperty()
camera_type: StringProperty()
lock_object_name: StringProperty()
class LayersData(PropertyGroup):
view_layers = BoolVectorProperty(size=20)
scene_layers = BoolVectorProperty(size=20)
lock_camera_and_layers: BoolProperty()
name: StringProperty()
class DisplayData(PropertyGroup):
name: StringProperty()
viewport_shade: EnumProperty(
items=[('BOUNDBOX', 'BOUNDBOX', 'BOUNDBOX'),
('WIREFRAME', 'WIREFRAME', 'WIREFRAME'),
('SOLID', 'SOLID', 'SOLID'),
('TEXTURED', 'TEXTURED', 'TEXTURED'),
('MATERIAL', 'MATERIAL', 'MATERIAL'),
('RENDERED', 'RENDERED', 'RENDERED')]
)
show_only_render: BoolProperty()
show_outline_selected: BoolProperty()
show_all_objects_origin: BoolProperty()
show_relationship_lines: BoolProperty()
show_floor: BoolProperty()
show_axis_x: BoolProperty()
show_axis_y: BoolProperty()
show_axis_z: BoolProperty()
grid_lines: IntProperty()
grid_scale: FloatProperty()
grid_subdivisions: IntProperty()
material_mode: StringProperty()
show_textured_solid: BoolProperty()
quad_view: BoolProperty()
lock_rotation: BoolProperty()
show_sync_view: BoolProperty()
use_box_clip: BoolProperty()
class ViewData(PropertyGroup):
pov: PointerProperty(
type=POVData
)
layers: PointerProperty(
type=LayersData
)
display: PointerProperty(
type=DisplayData
)
name: StringProperty()
class StoredViewsData(PropertyGroup):
pov_list: CollectionProperty(
type=POVData
)
layers_list: CollectionProperty(
type=LayersData
)
display_list: CollectionProperty(
type=DisplayData
)
view_list: CollectionProperty(
type=ViewData
)
mode: EnumProperty(
name="Mode",
items=[('VIEW', "View", "3D View settings"),
('POV', "POV", "POV settings"),
('LAYERS', "Layers", "Layers settings"),
('DISPLAY', "Display", "Display settings")],
default='VIEW'
)
current_indices: IntVectorProperty(
size=4,
default=[-1, -1, -1, -1]
)
view_modified: BoolProperty(
default=False
)
|