-
Notifications
You must be signed in to change notification settings - Fork 1
/
ui.py
33 lines (27 loc) · 960 Bytes
/
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
import bpy
from .color_by_axis_edges import CBA_Edges
class CBA_PT_Main_Panel(bpy.types.Panel):
bl_idname = "CBA_PT_Main_Panel"
bl_label = "Color by Axis"
bl_space_type = "VIEW_3D"
bl_region_type = "UI"
bl_category = "Color by Axis"
def draw(self, context):
@classmethod
def poll(self, context):
if context.mode != "OBJECT":
return True
else:
return False
layout = self.layout
layout.operator_context = "INVOKE_DEFAULT"
scene = context.scene
col1 = layout.column()
col1.label(text="Axis Type:")
col1.prop(scene, "axis_type", text="")
col2 = layout.column()
col2.label(text="Reference Object")
col2.prop_search(scene, "axis_ref", scene, "objects", text="")
layout.prop(scene, "draw_permanent")
layout.prop(scene, "draw_in_front")
layout.prop(scene, "line_width")