1d507ddaa0
- Added functions folder. - Added Combine Materials (Basic and needs imporvements. - Added common file, this is where any common things that could be used by multiple functions will live. - Clean materials, basic at the minute it cleans up material names in the given mesh by removing the '.001' suffix. - Added fix UV Cords in which is in common, this should fix faulty uv coordinates, may need improvements as it's was the best way i could think of for the time being. - Added join all meshes and selected meshes functions, this will use the fix uv cords while joining mehses. This is pretty basic as blender is quite good at doing the mesh joining itself. We may want to expand it in the future though.
35 lines
973 B
Python
35 lines
973 B
Python
|
|
|
|
if "bpy" not in locals():
|
|
import bpy
|
|
from . import ui
|
|
from . import core
|
|
from . import functions
|
|
from .core import register
|
|
from .core.register import __bl_ordered_classes
|
|
else:
|
|
import importlib
|
|
importlib.reload(ui)
|
|
importlib.reload(core)
|
|
importlib.reload(functions)
|
|
|
|
|
|
def register():
|
|
print("Registering Avatar Toolkit")
|
|
# Order the classes before registration
|
|
core.register.order_classes()
|
|
# Register the UI classes
|
|
|
|
# Iterate over the classes to register and register them
|
|
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(list(__bl_ordered_classes)):
|
|
bpy.utils.unregister_class(cls)
|
|
print("unregistering" + str(cls))
|