01f8363e07
- This is the start of the translations system, does not yet work as I can't seem to get it to swap languages, I too tired today to fix it but it's a start. - It also adds properties registration as well.
16 lines
659 B
Python
16 lines
659 B
Python
if "bpy" not in locals():
|
|
import bpy
|
|
import glob
|
|
import os
|
|
from os.path import dirname, basename, isfile, join
|
|
modules = glob.glob(join(dirname(__file__), "*.py"))
|
|
for module_name in [ basename(f)[:-3] for f in modules if isfile(f) and not f.endswith('__init__.py')]:
|
|
exec("from . import "+module_name)
|
|
print("importing " +module_name)
|
|
else:
|
|
import importlib
|
|
modules = glob.glob(join(dirname(__file__), "*.py"))
|
|
for module_name in [ basename(f)[:-3] for f in modules if isfile(f) and not f.endswith('__init__.py')]:
|
|
print("reloading " +module_name)
|
|
exec("importlib.reload("+module_name+")")
|