File indexing completed on 2025-01-05 04:00:26

0001 #!/usr/bin/env python3
0002 
0003 import sys
0004 import os
0005 import re
0006 
0007 blender_addon_dir = os.path.join(os.path.dirname(__file__), "blender", "lottie_io")
0008 sys.path.insert(0, blender_addon_dir)
0009 import lottie
0010 
0011 tup = repr(lottie.version_tuple)
0012 
0013 
0014 with open(os.path.join(blender_addon_dir, "__init__.py")) as f:
0015     data_in = f.read()
0016 
0017 data_out = re.sub("(version\": )(.*),", "\\1%s," % tup, data_in)
0018 
0019 with open(os.path.join(blender_addon_dir, "__init__.py"), "w") as f:
0020     f.write(data_out)