-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path__init__.py
136 lines (125 loc) · 4 KB
/
__init__.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
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTIBILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
bl_info = {
"name" : "Blender For FTC",
"author" : "RyanHCode",
"description" : "",
"blender" : (2, 80, 0),
"version" : (0, 0, 1),
"location" : "Object",
"warning" : "",
"category" : "Generic"
}
import bpy
from bpy.props import StringProperty, BoolProperty, IntProperty, CollectionProperty, FloatVectorProperty, FloatProperty
from .operators import *
from .panel import *
classes = (
SetupOp1,
BasicWorldOperator,
RefreshMats,
OT_CameraView,
CopyCurrentMat,
OT_Void_Panel,
Make_Field,
OT_StartMoveCamera,
OT_StopMoveCamera,
Nav_Pie,
OT_AutoAssign,
ListItem,
Mat_UI_List,
OT_Operator,
OT_AssignMaterial,
PT_Panel,
PT_Scene_Management,
PT_Make_Scene,
PT_Material_Config,
OT_Import_Custom
)
def register():
bpy.types.Scene.performance = EnumProperty(
items=[
("LOW", "Low", "Integrated/Very Old GPU"),
("MEDIUM", "Medium", "Decent GPU/Good integrated"),
("HIGH", "High", "Powerful GPU")
],
name="Performance",
description="Choose computer performance"
)
bpy.types.Scene.theme = EnumProperty(
items=[
("DRAMATIC", "Dramatic", "High contrast- Dramatic look. Recommended for field renders."),
("MEDIUM", "Medium", "Middle ground. Recommend for any plain-background scenes."),
("NORMAL", "Normal", "Default blender. Good overall, higher contrasts better for realistic renders however."),
("LOW", "Dull", "Dull colors. Not recommended.")
],
name="Theme",
description="Choose a color theme"
)
bpy.types.Scene.voidColor = FloatVectorProperty(
name="Void Color",
description="Color of background/Void",
subtype="COLOR",
size = 4,
min = 0.0,
max = 1.0,
default = (1.0,1.0,1.0,1.0)
)
bpy.types.Scene.lensD = BoolProperty(
name="Lens Distortion",
description="Lens Distortion",
default = False
)
bpy.types.Scene.denoisingFac = FloatProperty(
name="Denoising Fac",
default=0.4,
min=0.0,
max=1.0,
subtype="FACTOR"
)
bpy.types.Scene.contrast = FloatProperty(
name="ContrastMod",
default=0,
min=-1.0,
max=1.0,
subtype="FACTOR"
)
bpy.types.Scene.brightness = FloatProperty(
name="BrightnessMod",
default=0,
min=-1.0,
max=1.0,
subtype="FACTOR"
)
for cls in classes:
bpy.utils.register_class(cls)
kc = bpy.context.window_manager.keyconfigs.addon
km = kc.keymaps.new(name="3D View", space_type="VIEW_3D")
kmi_mnu = km.keymap_items.new("wm.call_menu_pie", "Q", "PRESS", shift=True)
kmi_mnu.properties.name = Nav_Pie.bl_idname
bpy.types.Scene.mat_list = CollectionProperty(type = ListItem)
bpy.types.Scene.mat_list_index = IntProperty(name = "Index for mat_list", default = 0)
def unregister():
del bpy.types.Scene.brightness
del bpy.types.Scene.contrast
del bpy.types.Scene.performance
del bpy.types.Scene.lensD
del bpy.types.Scene.denoisingFac
del bpy.types.Scene.theme
del bpy.types.Scene.mat_list
del bpy.types.Scene.mat_list_index
del bpy.types.Scene.voidColor
for cls in reversed(classes):
bpy.utils.unregister_class(cls)
if __name__ == "__main__":
register()