File indexing completed on 2025-01-19 04:00:01
0001 #!/usr/bin/env python3 0002 import sys 0003 import os 0004 sys.path.insert(0, os.path.join( 0005 os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 0006 "lib" 0007 )) 0008 from lottie.utils import script 0009 from lottie import objects 0010 from lottie.parsers.svg import parse_svg_file 0011 from lottie import Point 0012 0013 0014 an = parse_svg_file(os.path.join( 0015 os.path.dirname(os.path.abspath(__file__)), 0016 "blep.svg" 0017 )) 0018 0019 layer = an.find("durg") 0020 layer.transform.anchor_point.value = Point(256, 256) 0021 layer.transform.position.value = Point(256, 256) 0022 layer.transform.rotation.add_keyframe(0, 0) 0023 layer.transform.rotation.add_keyframe(30, 180) 0024 layer.transform.rotation.add_keyframe(60, 360) 0025 0026 0027 script.script_main(an)