Skip to content

Commit be2df65

Browse files
committed
alignement with official repo (just whitespaces)
1 parent 1828384 commit be2df65

25 files changed

+919
-919
lines changed

legacy/rigs/pitchipoy/limbs/arm.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,26 +27,26 @@
2727

2828
def create_arm( cls, bones ):
2929
org_bones = cls.org_bones
30-
30+
3131
bpy.ops.object.mode_set(mode='EDIT')
3232
eb = cls.obj.data.edit_bones
3333

3434
ctrl = get_bone_name( org_bones[2], 'ctrl', 'ik' )
35-
35+
3636
# Create IK arm control
3737
ctrl = copy_bone( cls.obj, org_bones[2], ctrl )
3838

39-
# clear parent (so that rigify will parent to root)
39+
# clear parent (so that rigify will parent to root)
4040
eb[ ctrl ].parent = None
4141
eb[ ctrl ].use_connect = False
4242

43-
# Parent
43+
# Parent
4444
eb[ bones['ik']['mch_target'] ].parent = eb[ ctrl ]
4545
eb[ bones['ik']['mch_target'] ].use_connect = False
46-
46+
4747
# Set up constraints
4848
# Constrain mch target bone to the ik control and mch stretch
49-
49+
5050
make_constraint( cls, bones['ik']['mch_target'], {
5151
'constraint' : 'COPY_LOCATION',
5252
'subtarget' : bones['ik']['mch_str'],
@@ -80,7 +80,7 @@ def create_arm( cls, bones ):
8080

8181
# Create ik/fk switch property
8282
pb_parent = pb[ bones['parent'] ]
83-
83+
8484
pb_parent['IK_Strertch'] = 1.0
8585
prop = rna_idprop_ui_prop_get( pb_parent, 'IK_Strertch', create=True )
8686
prop["min"] = 0.0
@@ -93,7 +93,7 @@ def create_arm( cls, bones ):
9393
b = bones['ik']['mch_str']
9494
drv = pb[b].constraints[-1].driver_add("influence").driver
9595
drv.type = 'SUM'
96-
96+
9797
var = drv.variables.new()
9898
var.name = prop.name
9999
var.type = "SINGLE_PROP"
@@ -102,7 +102,7 @@ def create_arm( cls, bones ):
102102
pb_parent.path_from_id() + '['+ '"' + prop.name + '"' + ']'
103103

104104
drv_modifier = cls.obj.animation_data.drivers[-1].modifiers[0]
105-
105+
106106
drv_modifier.mode = 'POLYNOMIAL'
107107
drv_modifier.poly_order = 1
108108
drv_modifier.coefficients[0] = 1.0

legacy/rigs/pitchipoy/limbs/leg.py

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def create_leg( cls, bones ):
3131
)
3232

3333
bones['ik']['ctrl']['terminal'] = []
34-
34+
3535
bpy.ops.object.mode_set(mode='EDIT')
3636
eb = cls.obj.data.edit_bones
3737

@@ -49,7 +49,7 @@ def create_leg( cls, bones ):
4949
ctrl = get_bone_name( org_bones[2], 'ctrl', 'ik' )
5050
ctrl = copy_bone( cls.obj, org_bones[2], ctrl )
5151

52-
# clear parent (so that rigify will parent to root)
52+
# clear parent (so that rigify will parent to root)
5353
eb[ ctrl ].parent = None
5454
eb[ ctrl ].use_connect = False
5555

@@ -64,7 +64,7 @@ def create_leg( cls, bones ):
6464
orient_bone( cls, eb[ ctrl ], 'y', reverse = True )
6565
eb[ ctrl ].length = l
6666

67-
# Parent
67+
# Parent
6868
eb[ heel ].use_connect = False
6969
eb[ heel ].parent = eb[ ctrl ]
7070

@@ -91,38 +91,38 @@ def create_leg( cls, bones ):
9191

9292
# Create 2nd roll mch, and two rock mch bones
9393
roll2_mch = get_bone_name( tmp_heel, 'mch', 'roll' )
94-
roll2_mch = copy_bone( cls.obj, org_bones[3], roll2_mch )
94+
roll2_mch = copy_bone( cls.obj, org_bones[3], roll2_mch )
9595

9696
eb[ roll2_mch ].use_connect = False
9797
eb[ roll2_mch ].parent = None
98-
99-
put_bone(
100-
cls.obj,
101-
roll2_mch,
98+
99+
put_bone(
100+
cls.obj,
101+
roll2_mch,
102102
( eb[ tmp_heel ].head + eb[ tmp_heel ].tail ) / 2
103103
)
104104

105105
eb[ roll2_mch ].length /= 4
106-
106+
107107
# Rock MCH bones
108108
rock1_mch = get_bone_name( tmp_heel, 'mch', 'rock' )
109-
rock1_mch = copy_bone( cls.obj, tmp_heel, rock1_mch )
109+
rock1_mch = copy_bone( cls.obj, tmp_heel, rock1_mch )
110110

111111
eb[ rock1_mch ].use_connect = False
112-
eb[ rock1_mch ].parent = None
113-
112+
eb[ rock1_mch ].parent = None
113+
114114
orient_bone( cls, eb[ rock1_mch ], 'y', 1.0, reverse = True )
115115
eb[ rock1_mch ].length = eb[ tmp_heel ].length / 2
116-
116+
117117
rock2_mch = get_bone_name( tmp_heel, 'mch', 'rock' )
118118
rock2_mch = copy_bone( cls.obj, tmp_heel, rock2_mch )
119119

120120
eb[ rock2_mch ].use_connect = False
121-
eb[ rock2_mch ].parent = None
121+
eb[ rock2_mch ].parent = None
122122

123123
orient_bone( cls, eb[ rock2_mch ], 'y', 1.0 )
124124
eb[ rock2_mch ].length = eb[ tmp_heel ].length / 2
125-
125+
126126
# Parent rock and roll MCH bones
127127
eb[ roll1_mch ].parent = eb[ roll2_mch ]
128128
eb[ roll2_mch ].parent = eb[ rock1_mch ]
@@ -135,7 +135,7 @@ def create_leg( cls, bones ):
135135
'subtarget' : heel,
136136
'owner_space' : 'LOCAL',
137137
'target_space' : 'LOCAL'
138-
})
138+
})
139139
make_constraint( cls, roll1_mch, {
140140
'constraint' : 'LIMIT_ROTATION',
141141
'use_limit_x' : True,
@@ -150,15 +150,15 @@ def create_leg( cls, bones ):
150150
'invert_x' : True,
151151
'owner_space' : 'LOCAL',
152152
'target_space' : 'LOCAL'
153-
})
153+
})
154154
make_constraint( cls, roll2_mch, {
155155
'constraint' : 'LIMIT_ROTATION',
156156
'use_limit_x' : True,
157157
'max_x' : math.radians(360),
158158
'owner_space' : 'LOCAL'
159-
})
159+
})
160160

161-
pb = cls.obj.pose.bones
161+
pb = cls.obj.pose.bones
162162
for i,b in enumerate([ rock1_mch, rock2_mch ]):
163163
head_tail = pb[b].head - pb[tmp_heel].head
164164
if '.L' in b:
@@ -176,22 +176,22 @@ def create_leg( cls, bones ):
176176
min_y = 0
177177
max_y = math.radians(360)
178178

179-
179+
180180
make_constraint( cls, b, {
181181
'constraint' : 'COPY_ROTATION',
182182
'subtarget' : heel,
183183
'use_x' : False,
184184
'use_z' : False,
185185
'owner_space' : 'LOCAL',
186186
'target_space' : 'LOCAL'
187-
})
187+
})
188188
make_constraint( cls, b, {
189189
'constraint' : 'LIMIT_ROTATION',
190190
'use_limit_y' : True,
191191
'min_y' : min_y,
192192
'max_y' : max_y,
193193
'owner_space' : 'LOCAL'
194-
})
194+
})
195195

196196
# Constrain 4th ORG to roll2 MCH bone
197197
make_constraint( cls, org_bones[3], {
@@ -201,7 +201,7 @@ def create_leg( cls, bones ):
201201

202202
# Set up constraints
203203
# Constrain mch target bone to the ik control and mch stretch
204-
204+
205205
make_constraint( cls, bones['ik']['mch_target'], {
206206
'constraint' : 'COPY_LOCATION',
207207
'subtarget' : bones['ik']['mch_str'],
@@ -235,7 +235,7 @@ def create_leg( cls, bones ):
235235

236236
# Create ik/fk switch property
237237
pb_parent = pb[ bones['parent'] ]
238-
238+
239239
pb_parent['IK_Strertch'] = 1.0
240240
prop = rna_idprop_ui_prop_get( pb_parent, 'IK_Strertch', create=True )
241241
prop["min"] = 0.0
@@ -248,7 +248,7 @@ def create_leg( cls, bones ):
248248
b = bones['ik']['mch_str']
249249
drv = pb[b].constraints[-1].driver_add("influence").driver
250250
drv.type = 'AVERAGE'
251-
251+
252252
var = drv.variables.new()
253253
var.name = prop.name
254254
var.type = "SINGLE_PROP"
@@ -257,7 +257,7 @@ def create_leg( cls, bones ):
257257
pb_parent.path_from_id() + '['+ '"' + prop.name + '"' + ']'
258258

259259
drv_modifier = cls.obj.animation_data.drivers[-1].modifiers[0]
260-
260+
261261
drv_modifier.mode = 'POLYNOMIAL'
262262
drv_modifier.poly_order = 1
263263
drv_modifier.coefficients[0] = 1.0
@@ -284,7 +284,7 @@ def create_leg( cls, bones ):
284284

285285
eb[ toes ].use_connect = False
286286
eb[ toes ].parent = eb[ org_bones[3] ]
287-
287+
288288
# Constrain toes def bones
289289
make_constraint( cls, bones['def'][-2], {
290290
'constraint' : 'DAMPED_TRACK',
@@ -293,8 +293,8 @@ def create_leg( cls, bones ):
293293
make_constraint( cls, bones['def'][-2], {
294294
'constraint' : 'STRETCH_TO',
295295
'subtarget' : toes
296-
})
297-
296+
})
297+
298298
make_constraint( cls, bones['def'][-1], {
299299
'constraint' : 'COPY_TRANSFORMS',
300300
'subtarget' : toes
@@ -303,12 +303,12 @@ def create_leg( cls, bones ):
303303
# Find IK/FK switch property
304304
pb = cls.obj.pose.bones
305305
prop = rna_idprop_ui_prop_get( pb[ bones['parent'] ], 'IK/FK' )
306-
306+
307307
# Add driver to limit scale constraint influence
308308
b = org_bones[3]
309309
drv = pb[b].constraints[-1].driver_add("influence").driver
310310
drv.type = 'AVERAGE'
311-
311+
312312
var = drv.variables.new()
313313
var.name = prop.name
314314
var.type = "SINGLE_PROP"
@@ -317,17 +317,17 @@ def create_leg( cls, bones ):
317317
pb_parent.path_from_id() + '['+ '"' + prop.name + '"' + ']'
318318

319319
drv_modifier = cls.obj.animation_data.drivers[-1].modifiers[0]
320-
320+
321321
drv_modifier.mode = 'POLYNOMIAL'
322322
drv_modifier.poly_order = 1
323323
drv_modifier.coefficients[0] = 1.0
324324
drv_modifier.coefficients[1] = -1.0
325-
325+
326326
# Create toe circle widget
327327
create_circle_widget(cls.obj, toes, radius=0.4, head_tail=0.5)
328328

329329
bones['ik']['ctrl']['terminal'] += [ toes ]
330330

331331
bones['ik']['ctrl']['terminal'] += [ heel, ctrl ]
332-
332+
333333
return bones

legacy/rigs/pitchipoy/limbs/limb_utils.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77

88
def orient_bone( cls, eb, axis, scale = 1.0, reverse = False ):
99
v = Vector((0,0,0))
10-
10+
1111
setattr(v,axis,scale)
1212

1313
if reverse:
1414
tail_vec = v * cls.obj.matrix_world
1515
eb.head[:] = eb.tail
16-
eb.tail[:] = eb.head + tail_vec
16+
eb.tail[:] = eb.head + tail_vec
1717
else:
1818
tail_vec = v * cls.obj.matrix_world
1919
eb.tail[:] = eb.head + tail_vec
@@ -29,22 +29,22 @@ def make_constraint( cls, bone, constraint ):
2929

3030
constraint['target'] = cls.obj
3131

32-
# filter contraint props to those that actually exist in the currnet
32+
# filter contraint props to those that actually exist in the currnet
3333
# type of constraint, then assign values to each
3434
for p in [ k for k in constraint.keys() if k in dir(const) ]:
3535
if p in dir( const ):
3636
setattr( const, p, constraint[p] )
3737
else:
3838
raise MetarigError(
39-
"RIGIFY ERROR: property %s does not exist in %s constraint" % (
39+
"RIGIFY ERROR: property %s does not exist in %s constraint" % (
4040
p, constraint['constraint']
4141
))
4242

4343
def get_bone_name( name, btype, suffix = '' ):
4444
# RE pattern match right or left parts
45-
# match the letter "L" (or "R"), followed by an optional dot (".")
45+
# match the letter "L" (or "R"), followed by an optional dot (".")
4646
# and 0 or more digits at the end of the the string
47-
pattern = r'^(\S+)(\.\S+)$'
47+
pattern = r'^(\S+)(\.\S+)$'
4848

4949
name = strip_org( name )
5050

@@ -60,7 +60,7 @@ def get_bone_name( name, btype, suffix = '' ):
6060
if suffix:
6161
results = re.match( pattern, name )
6262
bname, addition = ('','')
63-
63+
6464
if results:
6565
bname, addition = results.groups()
6666
name = bname + "_" + suffix + addition

0 commit comments

Comments
 (0)