-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRestControls
61 lines (51 loc) · 1.41 KB
/
RestControls
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
#################################################################
###################### Rest Ctrl ########################
#################################################################
#Author:Siddarth Mehra
#Email:[email protected]
#Mobile: +91-7728050400(Whatsapp)
#You can set this as Hotkey as 0 or something very useful to zeroout t s r on ctrls
#change the prifix on line 11 accordingly like '*Ctrl' '*Ctl' '*etc'
#remove # from line 61 if you want to set scale to 1
sel=cmds.ls('*Ctrl',an=True)
for i in sel:
try:
cmds.setAttr(i+'.translateX',0)
except:
pass
try:
cmds.setAttr(i+'.translateY',0)
except:
pass
try:
cmds.setAttr(i+'.translateZ',0)
except:
pass
try:
cmds.setAttr(i+'.rotateX',0)
except:
pass
try:
cmds.setAttr(i+'.rotateY',0)
except:
pass
try:
cmds.setAttr(i+'.rotateZ',0)
except:
pass
def sc():
sel=cmds.ls('*Ctrl',an=True)
for i in sel:
try:
cmds.setAttr(i+'.scaleX',1)
except:
pass
try:
cmds.setAttr(i+'.scaleY',1)
except:
pass
try:
cmds.setAttr(i+'.scaleZ',1)
except:
pass
#sc()