Don't die on variation-less xforms

This commit is contained in:
Steven Robertson 2012-05-20 12:53:38 -07:00
parent 805742d4ce
commit c5c05d6aa5

View File

@ -228,7 +228,7 @@ def padding_xform(xf, isfinal):
if get(xf, 45, 'post_affine', 'spread') > 90: if get(xf, 45, 'post_affine', 'spread') > 90:
xout['post_affine'] = {'angle': 135, 'spread': 135} xout['post_affine'] = {'angle': 135, 'spread': 135}
for k in xf['variations']: for k in xf.get('variations', {}):
if k in hole_variations: if k in hole_variations:
# Attempt to correct for some known-ugly variations. # Attempt to correct for some known-ugly variations.
xout['pre_affine']['angle'] += 180 xout['pre_affine']['angle'] += 180