-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui.py
47 lines (33 loc) · 1.22 KB
/
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
from bpy.types import Panel
class Snowman(Panel):
bl_idname = "snowman_object"
bl_label = "Snowman creation"
bl_space_type = "VIEW_3D"
bl_region_type = "TOOLS"
bl_category = "Snowman"
bl_context = "objectmode"
@classmethod
def poll(cls, context):
return context.mode == "OBJECT"
def draw(self, context):
layout = self.layout
scene = context.scene
snow = scene.snow
box = layout.box()
rowsub = box.row(align=True)
rowsub.label("Balls:")
rowsub.prop(snow, "ball_amount", text="")
rowsub = box.row(align=True)
rowsub.operator("snow.create_body", text="Create body")
rowsub = box.row(align=True)
rowsub.label("Nose length:")
rowsub.prop(snow, "nose_length", text="")
rowsub = box.row(align=True)
rowsub.operator("snow.create_face", text="Create face")
rowsub = box.row(align=True)
rowsub.label("Buttons:")
rowsub.prop(snow, "button_amount", text="")
rowsub = box.row(align=True)
rowsub.operator("snow.create_buttons", text="Create buttons")
rowsub = box.row(align=True)
rowsub.operator("snow.create_hat", text="Create hat")