forked from 6DK6DK/Ana-Blender-Pose-Helper
-
Notifications
You must be signed in to change notification settings - Fork 1
/
ui.py
64 lines (48 loc) · 1.57 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import bpy
# everything meaningful currently lives in this class, the two subpanels are commented out of register(). It may be useful to turn them into their own panels if they get enough content to be worth collapsing.
class PH_PoseHelper(bpy.types.Panel):
bl_idname = "PH_PT_PoseHelper"
bl_label = "Pose Helper"
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
bl_category = "Pose Helper"
def draw(self, context):
layout = self.layout
scene = context.scene
layout.prop(scene, "anamnesis_armature", text="Armature")
layout.operator("pose.load_ana_pose", text="Import")
layout.operator("pose.export_ana_pose", text="Export")
# UNUSED
class PH_Import(bpy.types.Panel):
bl_idname = "PH_PT_Import"
bl_label = "Import"
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
bl_category = "Pose Helper"
bl_parent_id = "PH_PT_PoseHelper"
def draw(self, context):
layout = self.layout
scene = context.scene
# column.prop(scene, "armature")
# UNUSED
class PH_Export(bpy.types.Panel):
bl_idname = "PH_PT_Export"
bl_label = "Export"
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
bl_category = "Pose Helper"
bl_parent_id = "PH_PT_PoseHelper"
def draw(self, context):
layout = self.layout
layout.label(text="Hello Export!")
classes = [
PH_PoseHelper,
# PH_Import,
# PH_Export
]
def register():
for cls in classes:
bpy.utils.register_class(cls)
def unregister():
for cls in classes:
bpy.utils.unregister_class(cls)