-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathRootUI.py
348 lines (258 loc) · 13.7 KB
/
RootUI.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
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
#=============================================
# author: changlong.zang
# mail: zclongpop@163.com
# date: Wed, 25 Jun 2014 14:43:02
#=============================================
import os
from PyQt4 import QtGui
from FoleyUtils import uiTool, scriptTool
#--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
Uiwnd, UiClass = uiTool.loadUi(os.path.join(scriptTool.getScriptPath(), 'RootUI.ui'))
class PlugTool(Uiwnd, UiClass):
def __init__(self, parent=uiTool.getMayaWindow()):
if uiTool.windowExists(parent, 'DDrigTools'):
return
super(PlugTool, self).__init__(parent)
self.setupUi(self)
#===============================================
self.tabWidget.setCurrentIndex(0)
self.toolBox.setCurrentIndex(1)
#============================================================================================================
self.setWindowIcon(QtGui.QIcon(os.path.join(scriptTool.getScriptPath(), 'icons', 'windowIcon.png')))
self.btn_TitleA.setIcon(QtGui.QIcon(os.path.join(scriptTool.getScriptPath(), 'icons', 'pencil.png')))
self.btn_TitleB.setIcon(QtGui.QIcon(os.path.join(scriptTool.getScriptPath(), 'icons', 'pencil.png')))
self.btn_TitleC.setIcon(QtGui.QIcon(os.path.join(scriptTool.getScriptPath(), 'icons', 'pencil.png')))
self.btn_GrabWindow.setIcon(QtGui.QIcon(os.path.join(scriptTool.getScriptPath(), 'icons', 'scissors.png')))
self.btn_CleanWindows.setIcon(QtGui.QIcon(os.path.join(scriptTool.getScriptPath(), 'icons', 'brush.png')))
self.btn_Help.setIcon(QtGui.QIcon(os.path.join(scriptTool.getScriptPath(), 'icons', 'help.png')))
#============================================================================================================
self.show()
def on_btn_GrabWindow_clicked(self, args=None):
if args==None:return
path = os.path.join(scriptTool.getScriptPath(), 'Snapshot', 'SogouSnapShot.exe')
path = path.replace('/', '\\')
os.popen('explorer.exe %s'%path)
def on_btn_CleanWindows_clicked(self, args=None):
if args==None:return
uiTool.cleanChildrenWindows(self.parent())
def on_btn_Help_clicked(self, args=None):
if args==None:return
path = os.path.join(scriptTool.getScriptPath(), 'ToolIndex', 'readme.docx')
path = path.replace('/', '\\')
os.system('explorer.exe %s'%path)
def on_btn_RenameJointToSystem_clicked(self, args=None):
if args==None:return
import Plugcmds.RenameJnts
reload(Plugcmds.RenameJnts)
Plugcmds.RenameJnts.setupRename()
def on_btn_MirrorControlShape_clicked(self, args=None):
if args==None:return
import Plugcmds.mirrorCtlShp
reload(Plugcmds.mirrorCtlShp)
Plugcmds.mirrorCtlShp.MirrorControlShp(uiTool.getMayaWindow())
def on_btn_LatticeWeight_clicked(self, args=None):
if args==None:return
import Plugcmds.latticeWeightsTool
reload(Plugcmds.latticeWeightsTool)
Plugcmds.latticeWeightsTool.latticeWeightTool()
def on_btn_ControlColor_clicked(self, args=None):
if args==None:return
import Plugcmds.ControlColor
reload(Plugcmds.ControlColor)
Plugcmds.ControlColor.ColorWindow(uiTool.getMayaWindow())
def on_btn_NameTool_clicked(self, args=None):
if args==None:return
import Plugcmds.nameToolCmds
reload(Plugcmds.nameToolCmds)
Plugcmds.nameToolCmds.NameUI(uiTool.getMayaWindow())
def on_btn_SetToesDrivenKey_clicked(self, args=None):
if args==None:return
import Plugcmds.SetDrivenKeysforToes
reload(Plugcmds.SetDrivenKeysforToes)
Plugcmds.SetDrivenKeysforToes.SetDrivenKeyforToes(uiTool.getMayaWindow())
def on_btn_MakeJointsOnCurve_clicked(self, args=None):
if args==None:return
import Plugcmds.makeAttachJoints.makeAttachJoints
reload(Plugcmds.makeAttachJoints.makeAttachJoints)
Plugcmds.makeAttachJoints.makeAttachJoints.makeAttachJoints(uiTool.getMayaWindow())
def on_btn_MirrorDrivenkey_clicked(self, args=None):
if args==None:return
import Plugcmds.mirrorSDK
reload(Plugcmds.mirrorSDK)
Plugcmds.mirrorSDK.MirrorSetDrivenKey(uiTool.getMayaWindow())
def on_btn_QuickSDKA_clicked(self, args=None):
if args==None:return
import Plugcmds.quickSDKTool
reload(Plugcmds.quickSDKTool)
Plugcmds.quickSDKTool.quickSDK(uiTool.getMayaWindow())
def on_btn_MoveObject_clicked(self, args=None):
if args==None:return
import Plugcmds.ChangeOBJpivot
reload(Plugcmds.ChangeOBJpivot)
Plugcmds.ChangeOBJpivot.ChangeOBJpivot(uiTool.getMayaWindow())
def on_btn_InspectScene_clicked(self, args=None):
if args==None:return
import Plugcmds.inspectScene.inspectScene
reload(Plugcmds.inspectScene.inspectScene)
Plugcmds.inspectScene.inspectScene.InspectSceneUI(uiTool.getMayaWindow())
def on_btn_BlendIKFKOutput_clicked(self, args=None):
if args==None:return
import Plugcmds.BlendIKFKoutputs
reload(Plugcmds.BlendIKFKoutputs)
instance = Plugcmds.BlendIKFKoutputs.CompIKFKoutput()
instance.builde()
def on_btn_DynamicControl_clicked(self, args=None):
if args==None:return
import Plugcmds.DynControl.DynControl
reload(Plugcmds.DynControl.DynControl)
Plugcmds.DynControl.DynControl.DynControl(uiTool.getMayaWindow())
def on_btn_makeRotateInfo_clicked(self, args=None):
if args==None:return
import Plugcmds.makeRotateInfo
reload(Plugcmds.makeRotateInfo)
Plugcmds.makeRotateInfo.makeRotateInfo()
def on_btn_FixAnim_clicked(self, args=None):
if args==None:return
import Plugcmds.FixAnim
reload(Plugcmds.FixAnim)
Plugcmds.FixAnim.FixAnim(uiTool.getMayaWindow())
def on_btn_IKFKSwitch_clicked(self, args=None):
if args==None:return
import Plugcmds.IKFKSwitch.IKFKSwitch
reload(Plugcmds.IKFKSwitch.IKFKSwitch)
Plugcmds.IKFKSwitch.IKFKSwitch.IKFKSwitch(uiTool.getMayaWindow())
def on_btn_AddIKFKSwitch_clicked(self, args=None):
if args==None:return
import Plugcmds.IKFKSwitch
reload(Plugcmds.IKFKSwitch)
Plugcmds.IKFKSwitch .addIKFKSwitch()
def on_btn_MakeHeadStreatch_clicked(self, args=None):
if args==None:return
import Plugcmds.HeadStreatch.HeadStreatchTool
reload(Plugcmds.HeadStreatch.HeadStreatchTool)
Plugcmds.HeadStreatch.HeadStreatchTool.HeadStreatchUI(uiTool.getMayaWindow())
def on_btn_AddPalmJoint_clicked(self, args=None):
if args==None:return
import Plugcmds.addPalmBindJoint
reload(Plugcmds.addPalmBindJoint)
Plugcmds.addPalmBindJoint.addPalmBindJoint()
def on_btn_QuickSDKB_clicked(self, args=None):
if args==None:return
import Plugcmds.quickSetDrivenKey
reload(Plugcmds.quickSetDrivenKey )
Plugcmds.quickSetDrivenKey .QuickSetDrivenKey(uiTool.getMayaWindow())
def on_btn_faceControlBuilder_clicked(self, args=None):
if args==None:return
import Plugcmds.ConvertControl.FaceControlBuilderUI
reload(Plugcmds.ConvertControl.FaceControlBuilderUI)
Plugcmds.ConvertControl.FaceControlBuilderUI.FaceControlBuilderUI(uiTool.getMayaWindow())
def on_btn_AddTwistJoints_clicked(self, args=None):
if args==None:return
import Plugcmds.addTwistJoints.UI
reload(Plugcmds.addTwistJoints.UI)
Plugcmds.addTwistJoints.UI.AddTwistJointsUI(uiTool.getMayaWindow())
def on_btn_SaveDrivenKey_clicked(self, args=None):
if args==None:return
import Plugcmds.saveDrivenKeys
reload(Plugcmds.saveDrivenKeys)
Plugcmds.saveDrivenKeys.SaveDrivenKeyWindow(uiTool.getMayaWindow())
def on_btn_ControlSelecter_clicked(self, args=None):
if args==None:return
import Plugcmds.ControlSelecter.ControlSelecterUI
reload(Plugcmds.ControlSelecter.ControlSelecterUI)
Plugcmds.ControlSelecter.ControlSelecterUI.ControlSelecterWnd(uiTool.getMayaWindow())
def on_btn_ShapeBuilder_clicked(self, args=None):
if args == None:return
import Plugcmds.ShapeBuilder.ShapeBuilderUI
reload(Plugcmds.ShapeBuilder.ShapeBuilderUI)
Plugcmds.ShapeBuilder.ShapeBuilderUI.ShapeBuilderUI(uiTool.getMayaWindow())
def on_btn_Tpose_clicked(self, args=None):
if args == None:return
import Plugcmds.Tpose
reload(Plugcmds.Tpose)
Plugcmds.Tpose.backtoTpose()
def on_btn_BlendShapeWeightTool_clicked(self, args=None):
if args == None:return
import Plugcmds.blendShapeWeights
reload(Plugcmds.blendShapeWeights)
Plugcmds.blendShapeWeights.BlendShapeWeightUI(uiTool.getMayaWindow())
def on_btn_CopyBlendShapeWeights_clicked(self, args=None):
if args == None:return
import Plugcmds.CopyBlendShapeWeights.CopyBlendShapeWeights
reload(Plugcmds.CopyBlendShapeWeights.CopyBlendShapeWeights)
Plugcmds.CopyBlendShapeWeights.CopyBlendShapeWeights.CopyBlendShapeWeightsUI(uiTool.getMayaWindow())
def on_btn_animSceneReader_clicked(self, args=None):
if args == None:return
import Plugcmds.AnimSceneReader.AnimSceneReader
reload(Plugcmds.AnimSceneReader.AnimSceneReader)
Plugcmds.AnimSceneReader.AnimSceneReader.AnimSceneReaderUI(uiTool.getMayaWindow())
def on_btn_ReBuildeTargents_clicked(self, args=None):
if args == None:return
import Plugcmds.buildTargents
reload(Plugcmds.buildTargents)
Plugcmds.buildTargents.BuildTargents(uiTool.getMayaWindow())
def on_btn_mirrorDrivenkeys_clicked(self, args=None):
if args == None:return
import Plugcmds.mirrorDrivenKeys
reload(Plugcmds.mirrorDrivenKeys)
Plugcmds.mirrorDrivenKeys.MirrorDrivenKeysUI(uiTool.getMayaWindow())
def on_btn_makeControlSet_clicked(self, args=None):
if args == None:return
import Plugcmds.createControlSet
reload(Plugcmds.createControlSet)
Plugcmds.createControlSet.CreateControlSetUI(uiTool.getMayaWindow())
def on_btn_addGroups_clicked(self, args=None):
if args == None:return
import Plugcmds.addGroups.addGroups
reload(Plugcmds.addGroups.addGroups)
Plugcmds.addGroups.addGroups.AddGroup(uiTool.getMayaWindow())
def on_btn_fixShapeTool_clicked(self, args=None):
if args == None:return
import Plugcmds.FixShape.FixShape
reload(Plugcmds.FixShape.FixShape)
Plugcmds.FixShape.FixShape.FixShapeUI(uiTool.getMayaWindow())
def on_btn_ReplaceUV_clicked(self, args=None):
if args == None:return
import Plugcmds.ReplaceUV.ReplaceUV
reload(Plugcmds.ReplaceUV.ReplaceUV)
Plugcmds.ReplaceUV.ReplaceUV.ReplaceUV(uiTool.getMayaWindow())
def on_btn_EditBlendShapeWeights_clicked(self, args=None):
if args == None:return
import Plugcmds.blendShapeWeightsTool.blendShapeWeights
reload(Plugcmds.blendShapeWeightsTool.blendShapeWeights)
Plugcmds.blendShapeWeightsTool.blendShapeWeights.BlendShapeWeightsUI(uiTool.getMayaWindow())
def on_btn_transWeights_clicked(self, args=None):
if args == None:return
import Plugcmds.TransWeights.TransWeights
reload(Plugcmds.TransWeights.TransWeights)
Plugcmds.TransWeights.TransWeights.TransWeightsUI(uiTool.getMayaWindow())
def on_btn_convertSkin_clicked(self, args=None):
if args == None:return
import Plugcmds.transSkinWeightsToCluster.transWeights
reload(Plugcmds.transSkinWeightsToCluster.transWeights)
Plugcmds.transSkinWeightsToCluster.transWeights.transWeightsUI(uiTool.getMayaWindow())
def on_btn_copyClusterWeights_clicked(self, args=None):
if args == None:return
import Plugcmds.MirrorClusterWeights.MirrorClusterWeights
reload(Plugcmds.MirrorClusterWeights.MirrorClusterWeights)
Plugcmds.MirrorClusterWeights.MirrorClusterWeights.ClusterWeightsUI(uiTool.getMayaWindow())
def on_btn_WeightsTool_clicked(self, args=None):
if args == None:return
import Plugcmds.weightsTool.weightsTool
reload(Plugcmds.weightsTool.weightsTool)
Plugcmds.weightsTool.weightsTool.WeightsTool(uiTool.getMayaWindow())
def on_btn_findCoincidentGeometry_clicked(self, args=None):
if args == None:return
import Plugcmds.findCoincidentGeometry.findCoincidentGeometryUI
reload(Plugcmds.findCoincidentGeometry.findCoincidentGeometryUI)
Plugcmds.findCoincidentGeometry.findCoincidentGeometryUI.findCoincidentGeometryUI(uiTool.getMayaWindow())
def on_btn_ProjectTool_clicked(self, args=None):
if args == None:return
import Plugcmds.projectTool.ProjectTool
reload(Plugcmds.projectTool.ProjectTool)
Plugcmds.projectTool.ProjectTool.ProjectUI(uiTool.getMayaWindow())
def on_btn_mirrorfacecontrolDrivenkeys_clicked(self, args=None):
if args == None:return
import Plugcmds.mirrorFaceControlDrivenkeys
reload(Plugcmds.mirrorFaceControlDrivenkeys)
Plugcmds.mirrorFaceControlDrivenkeys.mirrorDrivenkeyByControls()