Update am_primitive.py

Fix bug when circle doesn't have any rotation by adding a default 0 degree rotation.
This commit is contained in:
Marin Mikaël 2019-07-24 01:20:15 +09:00 committed by GitHub
parent 89b5b714c9
commit 415bdbc2e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -56,7 +56,7 @@ class AMCirclePrimitiveDef(AMPrimitiveDef):
diameter = modifiers[1] diameter = modifiers[1]
center_x = modifiers[2] center_x = modifiers[2]
center_y = modifiers[3] center_y = modifiers[3]
rotation = modifiers[4] rotation = modifiers[4] if len(modifiers)>4 else AMConstantExpression(float(0))
return cls(code, exposure, diameter, center_x, center_y, rotation) return cls(code, exposure, diameter, center_x, center_y, rotation)
def __init__(self, code, exposure, diameter, center_x, center_y, rotation): def __init__(self, code, exposure, diameter, center_x, center_y, rotation):