Move definition of animatable for shorthands to Shorthand object

By moving this definition to the Shorthand object we can more easily
re-use it in subsequent patches in this series.
This commit is contained in:
Brian Birtles 2017-06-15 10:11:34 +09:00
parent f8e2f85cdc
commit 09c2b1b930
2 changed files with 11 additions and 11 deletions

View file

@ -234,6 +234,16 @@ class Shorthand(object):
self.allowed_in_keyframe_block = allowed_in_keyframe_block \
and allowed_in_keyframe_block != "False"
def get_animatable(self):
animatable = False
for sub in self.sub_properties:
if sub.animatable:
animatable = True
break
return animatable
animatable = property(get_animatable)
class Method(object):
def __init__(self, name, return_type=None, arg_types=None, is_mut=False):