-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBL_Panel.py
More file actions
131 lines (90 loc) · 4.05 KB
/
BL_Panel.py
File metadata and controls
131 lines (90 loc) · 4.05 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
import bpy
from . BL_GenLine import GenLine
from . BL_GenMech import GenMech
from . BL_EdgesGen import EdgesGen
from . BL_Properties import AMProperties
from . BL_Tool import *
from . BL_MechClean import MechClean
from . BL_AddRig import AddRig
from . BL_BindRig import BindRig
from . BL_WeightRig import WeightRig
from bpy.types import Panel,Operator,PropertyGroup
from bpy.props import FloatProperty, PointerProperty
class AutoMechPanel(bpy.types.Panel):
bl_label = "Auto Mech"
bl_idname = "Auto_Mech_Panel"
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
bl_category = 'AutoMech'
def draw(self, context):
sampleProperty = context.scene.samplePropertyGroup
amProperty = context.scene.amProperties
obj = context.object
layout = self.layout
col = layout.column(align=True)
row = col.row(align=True)
row5 = layout.row(align=True)
col2 = layout.column(align=True)
row2 = col2.row(align=True)
col3 = layout.column(align=True)
row3 = col3.row(align=True)
col4 = layout.column(align=True)
row4 = col4.row(align=True)
col5 = layout.column(align=True)
col5.prop(amProperty, "GenLineEnum")
col5.operator("object.bl_genline" , text = "1.Gen Line")
#if amProperty.GenLineEnum =='GenLineOnly':
#col.prop(sampleProperty, "edgeName")
row.prop(sampleProperty, "edgeMin")
row.prop(sampleProperty, "edgeMax")
row.prop(sampleProperty, "edgeVNumber")
#col5 = layout.column(align=True)
row5.prop(sampleProperty, "edgeXYZ")
row5.prop(sampleProperty, "edgeLocBool")
row5.prop(sampleProperty, "LocEditBool")
if sampleProperty.edgeXYZ == True:
row2.prop(sampleProperty, "xuMin")
row2.prop(sampleProperty, "yuMin")
row2.prop(sampleProperty, "zuMin")
row3.prop(sampleProperty, "xvMax")
row3.prop(sampleProperty, "yvMax")
row3.prop(sampleProperty, "zvMax")
if sampleProperty.edgeLocBool == True:
col4.prop(sampleProperty, "edgeLoc")
#sampleProperty.edgeLoc = (0,0,0)
if sampleProperty.LocEditBool == True:
col4.prop(sampleProperty, "LocEdit")
# invoke custom operator
col6 = layout.column(align=True)
row6 = col6.row(align=True)
col6.prop(amProperty, "GenMechEnum")
row6.prop(amProperty, "GenMechMirrorBoll")
row6.prop(amProperty, "GenMechResizeBoll")
if amProperty.GenMechResizeBoll == True:
col6.prop(amProperty, "GenMechResize")
row6.prop(amProperty, "GenMechSkinSizeBool")
if amProperty.GenMechSkinSizeBool == True:
col6.prop(amProperty, "GenMechSkinResize")
#GenMechRemeshEnum
#row8.prop(amProperty, "GenMechRemeshEnum")
#row6.prop(amProperty, "GenMechApplyBoll")
col7 = layout.column(align=True)
row7 = col7.row(align=True)
col8 = layout.column(align=True)
row8 = col8.row(align=True)
col6.prop(amProperty, "GenMechRemeshEnum")
col6.prop(amProperty, "GenMechRemeshScale")#
col6.prop(amProperty, "GenMechBevel0Enum")
if amProperty.GenMechBevel0Enum =='PERCENT':
col6.prop(sampleProperty, "Bevel0float")
col6.operator("object.bl_genmech" , text = "2.Gen Mech")
col7.operator("am.applymodify" , text = "3.ApplyMechModifiers")
col7.operator("object.mechclean" , text = "4.MechClean(Edit)")
row7.prop(amProperty, "GenMechBemeshClean")
row7.prop(amProperty, "GenMechUVPackmaster")
row7.operator("am.rename" , text = "ReName")
col7.operator("object.applyclean" , text = "5.ApplyClean(Edit)")
col7.operator("am.mirrorselect" , text = "6.MirrorSelect")
col8.operator("aw.addrig" , text = "7.AddRig(Rigify)")
col8.operator("aw.bindrig" , text = "8.BindAllRig")
col8.operator("aw.weightrig" , text = "9.WeightRig")