Translation Updates.
- Added addon_preferences so we can save users preferences into a json file. - Made translation slightly simpler This mostly works just have to figure out why we can't update description on reload (There only update on blender restart).
This commit is contained in:
+6
-6
@@ -6,12 +6,14 @@ if "bpy" not in locals():
|
||||
from .core import register
|
||||
from .core.register import __bl_ordered_classes
|
||||
from .core import properties
|
||||
from .core import addon_preferences
|
||||
else:
|
||||
import importlib
|
||||
importlib.reload(ui)
|
||||
importlib.reload(core)
|
||||
importlib.reload(functions)
|
||||
importlib.reload(properties)
|
||||
importlib.reload(addon_preferences)
|
||||
|
||||
def register():
|
||||
print("Registering Avatar Toolkit")
|
||||
@@ -26,18 +28,16 @@ def register():
|
||||
# Register the properties
|
||||
core.register.register_properties()
|
||||
# Register the UI classes
|
||||
for cls in core.register.__bl_ordered_classes:
|
||||
print("registering " + str(cls))
|
||||
bpy.utils.register_class(cls)
|
||||
|
||||
|
||||
for cls in __bl_ordered_classes:
|
||||
print("registering" + str(cls))
|
||||
bpy.utils.register_class(cls)
|
||||
|
||||
def unregister():
|
||||
print("Unregistering Avatar Toolkit")
|
||||
# Unregister the UI classes
|
||||
|
||||
# Iterate over the classes to unregister in reverse order and unregister them
|
||||
for cls in reversed(core.register.__bl_ordered_classes):
|
||||
for cls in reversed(list(__bl_ordered_classes)):
|
||||
bpy.utils.unregister_class(cls)
|
||||
print("unregistering " + str(cls))
|
||||
core.register.unregister_properties()
|
||||
|
||||
Reference in New Issue
Block a user