-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpanels.py
54 lines (44 loc) · 1.81 KB
/
panels.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
import bpy
class OBJECT_PT_SkeletonTool(bpy.types.Panel):
""" Creates a Panel in the Object properties window """
bl_label = "Jedi Academy: Skeleton tool"
bl_idname = "OBJECT_PT_Skeleton_Tool"
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
bl_context = "objectmode"
bl_category = "Skeleton tool"
bl_options = {'DEFAULT_CLOSED'}
def draw(self, context):
''' Sized box which can encompass all the buttons, could be more adjusted.
Keep parent buttons as different in the Playermodel tag; set create LODs within the function
and send create tags to misc and disabled cause it's not working'''
layout = self.layout
layout.ui_units_x = 14.0
layout.ui_units_y = 14.0
settings = context.scene.settings
obj = context.object
box = layout.box()
box.label(text="Playermodel")
box.operator("create.root")
box.operator("set.armaturemod")
box.operator("parent.objects")
box.operator("parent.caps")
box.operator("create.tags")
box.operator("parent.tags")
box.operator("set.g2properties")
box.operator("create.skinfile")
box = layout.box()
box.label(text="Misc")
box.operator("remove.parent")
box.operator("clean.hierarchy")
box.operator("remove.emptyvgroups")
box = layout.box()
box.label(text="Select")
box.operator("select.object_type")
box.prop(settings, "meshes")
box.prop(settings, "caps")
box.prop(settings, "tags")
def register_panels():
bpy.utils.register_class(OBJECT_PT_SkeletonTool)
def unregister_panels():
bpy.utils.unregister_class(OBJECT_PT_SkeletonTool)