4 sys.path.insert(0, os.path.join(
5 os.path.dirname(os.path.dirname(os.path.abspath(__file__))),
10 from lottie
import objects
12 from lottie
import Color
16 os.path.dirname(os.path.abspath(__file__)),
20 layer = an.find(
"durg")
23 for fill
in layer.find_all((objects.Fill, objects.Stroke)):
24 if isinstance(fill.color.value, list):
25 import pdb; pdb.set_trace();
pass
26 color = fill.color.value.converted(Color.Mode.LCH_uv)
28 for frame
in range(n_frames):
29 off = frame / (n_frames-1)
30 color.hue = (color.hue + math.tau / (n_frames-1)) % math.tau
31 fill.color.add_keyframe(off * last_frame, color.to_rgb())
34 script.script_main(an)
def parse_svg_file(file, layer_frames=0, *args, **kwargs)