Sun position: remove unused prop in HDRI mode
[blender-addons.git] / object_carver / carver_preferences.py
blob1e6bc7ab403808aee4fd4c2f4241c34487b96937
1 import bpy
2 from bpy.props import (
3 BoolProperty,
4 IntProperty,
5 PointerProperty,
6 StringProperty,
9 class CarverPrefs(bpy.types.AddonPreferences):
10 bl_idname = __name__
12 Enable_Tab_01: BoolProperty(
13 name="Info",
14 description="Some general information and settings about the add-on",
15 default=False
17 Enable_Tab_02: BoolProperty(
18 name="Hotkeys",
19 description="List of the shortcuts used during carving",
20 default=False
22 bpy.types.Scene.Key_Create: StringProperty(
23 name="Object creation",
24 description="Object creation",
25 maxlen=1,
26 default="C"
28 bpy.types.Scene.Key_Update: StringProperty(
29 name="Auto Bevel Update",
30 description="Auto Bevel Update",
31 maxlen=1,
32 default="A",
34 bpy.types.Scene.Key_Bool: StringProperty(
35 name="Boolean type",
36 description="Boolean operation type",
37 maxlen=1,
38 default="T",
40 bpy.types.Scene.Key_Brush: StringProperty(
41 name="Brush Mode",
42 description="Brush Mode",
43 maxlen=1,
44 default="B",
46 bpy.types.Scene.Key_Help: StringProperty(
47 name="Help display",
48 description="Help display",
49 maxlen=1,
50 default="H",
52 bpy.types.Scene.Key_Instant: StringProperty(
53 name="Instantiate",
54 description="Instantiate object",
55 maxlen=1,
56 default="I",
58 bpy.types.Scene.Key_Close: StringProperty(
59 name="Close polygonal shape",
60 description="Close polygonal shape",
61 maxlen=1,
62 default="X",
64 bpy.types.Scene.Key_Apply: StringProperty(
65 name="Apply operation",
66 description="Apply operation",
67 maxlen=1,
68 default="Q",
70 bpy.types.Scene.Key_Scale: StringProperty(
71 name="Scale object",
72 description="Scale object",
73 maxlen=1,
74 default="S",
76 bpy.types.Scene.Key_Gapy: StringProperty(
77 name="Gap rows",
78 description="Scale gap between columns",
79 maxlen=1,
80 default="J",
82 bpy.types.Scene.Key_Gapx: StringProperty(
83 name="Gap columns",
84 description="Scale gap between columns",
85 maxlen=1,
86 default="U",
88 bpy.types.Scene.Key_Depth: StringProperty(
89 name="Depth",
90 description="Cursor depth or solidify pattern",
91 maxlen=1,
92 default="D",
94 bpy.types.Scene.Key_BrushDepth: StringProperty(
95 name="Brush Depth",
96 description="Brush depth",
97 maxlen=1,
98 default="C",
100 bpy.types.Scene.Key_Subadd: StringProperty(
101 name="Add subdivision",
102 description="Add subdivision",
103 maxlen=1,
104 default="X",
106 bpy.types.Scene.Key_Subrem: StringProperty(
107 name="Remove subdivision",
108 description="Remove subdivision",
109 maxlen=1,
110 default="W",
112 bpy.types.Scene.Key_Randrot: StringProperty(
113 name="Random rotation",
114 description="Random rotation",
115 maxlen=1,
116 default="R",
118 bpy.types.Scene.ProfilePrefix: StringProperty(
119 name="Profile prefix",
120 description="Prefix to look for profiles with",
121 default="Carver_Profile-"
124 def draw(self, context):
125 scene = context.scene
126 layout = self.layout
127 print("DRAW !")
129 icon_1 = "TRIA_RIGHT" if not self.Enable_Tab_01 else "TRIA_DOWN"
130 box = layout.box()
132 box.prop(self, "Enable_Tab_01", text="Info and Settings", emboss=False, icon=icon_1)
133 if self.Enable_Tab_01:
134 box.label(text="Carver Operator:", icon="LAYER_ACTIVE")
135 box.label(text="Select a Mesh Object and press [CTRL]+[SHIFT]+[X] to carve",
136 icon="LAYER_USED")
137 box.label(text="To finish carving press [ESC] or [RIGHT CLICK]",
138 icon="LAYER_USED")
139 box.prop(scene, "ProfilePrefix", text="Profile prefix")
141 icon_2 = "TRIA_RIGHT" if not self.Enable_Tab_02 else "TRIA_DOWN"
142 box = layout.box()
143 box.prop(self, "Enable_Tab_02", text="Keys", emboss=False, icon=icon_2)
144 if self.Enable_Tab_02:
145 split = box.split(align=True)
146 box = split.box()
147 col = box.column(align=True)
148 col.label(text="Object Creation:")
149 col.prop(scene, "Key_Create", text="")
150 col.label(text="Auto bevel update:")
151 col.prop(scene, "Key_Update", text="")
152 col.label(text="Boolean operation type:")
153 col.prop(scene, "Key_Bool", text="")
154 col.label(text="Brush Depth:")
155 col.prop(scene, "Key_BrushDepth", text="")
157 box = split.box()
158 col = box.column(align=True)
159 col.label(text="Brush Mode:")
160 col.prop(scene, "Key_Brush", text="")
161 col.label(text="Help display:")
162 col.prop(scene, "Key_Help", text="")
163 col.label(text="Instantiate object:")
164 col.prop(scene, "Key_Instant", text="")
165 col.label(text="Random rotation:")
166 col.prop(scene, "Key_Randrot", text="")
168 box = split.box()
169 col = box.column(align=True)
170 col.label(text="Close polygonal shape:")
171 col.prop(scene, "Key_Close", text="")
172 col.label(text="Apply operation:")
173 col.prop(scene, "Key_Apply", text="")
174 col.label(text="Scale object:")
175 col.prop(scene, "Key_Scale", text="")
176 col.label(text="Subdiv add:")
177 col.prop(scene, "Key_Subadd", text="")
179 box = split.box()
180 col = box.column(align=True)
181 col.label(text="Gap rows:")
182 col.prop(scene, "Key_Gapy", text="")
183 col.label(text="Gap columns:")
184 col.prop(scene, "Key_Gapx", text="")
185 col.label(text="Depth / Solidify:")
186 col.prop(scene, "Key_Depth", text="")
187 col.label(text="Subdiv Remove:")
188 col.prop(scene, "Key_Subrem", text="")
190 def register():
191 bpy.utils.register_class(CarverPrefs)
193 def unregister():
194 bpy.utils.unregister_class(CarverPrefs)