Reorganized file structure and added WIP (non-working) PSA export.
This commit is contained in:
@@ -13,32 +13,48 @@ bl_info = {
|
||||
|
||||
if 'bpy' in locals():
|
||||
import importlib
|
||||
importlib.reload(psk)
|
||||
importlib.reload(exporter)
|
||||
importlib.reload(builder)
|
||||
importlib.reload(psk_data)
|
||||
importlib.reload(psk_builder)
|
||||
importlib.reload(psk_exporter)
|
||||
importlib.reload(psk_operator)
|
||||
importlib.reload(psa_data)
|
||||
importlib.reload(psa_builder)
|
||||
importlib.reload(psa_exporter)
|
||||
importlib.reload(psa_operator)
|
||||
else:
|
||||
# if i remove this line, it can be enabled just fine
|
||||
from . import psk
|
||||
from . import exporter
|
||||
from . import builder
|
||||
from .psk import data as psk_data
|
||||
from .psk import builder as psk_builder
|
||||
from .psk import exporter as psk_exporter
|
||||
from .psk import operator as psk_operator
|
||||
from .psa import data as psa_data
|
||||
from .psa import builder as psa_builder
|
||||
from .psa import exporter as psa_exporter
|
||||
from .psa import operator as psa_operator
|
||||
|
||||
import bpy
|
||||
|
||||
classes = [
|
||||
exporter.PskExportOperator
|
||||
psk_operator.PskExportOperator,
|
||||
psa_operator.PsaExportOperator
|
||||
]
|
||||
|
||||
def menu_func(self, context):
|
||||
self.layout.operator(exporter.PskExportOperator.bl_idname, text = "Unreal PSK (.psk)")
|
||||
def psk_menu_func(self, context):
|
||||
self.layout.operator(psk_operator.PskExportOperator.bl_idname, text ='Unreal PSK (.psk)')
|
||||
|
||||
def psa_menu_func(self, context):
|
||||
self.layout.operator(psa_operator.PsaExportOperator.bl_idname, text='Unreal PSA (.psa)')
|
||||
|
||||
def register():
|
||||
from bpy.utils import register_class
|
||||
for cls in classes:
|
||||
register_class(cls)
|
||||
bpy.types.TOPBAR_MT_file_export.append(menu_func)
|
||||
bpy.types.TOPBAR_MT_file_export.append(psk_menu_func)
|
||||
bpy.types.TOPBAR_MT_file_export.append(psa_menu_func)
|
||||
|
||||
def unregister():
|
||||
bpy.types.TOPBAR_MT_file_export.remove(menu_func)
|
||||
bpy.types.TOPBAR_MT_file_export.remove(psa_menu_func)
|
||||
bpy.types.TOPBAR_MT_file_export.remove(psk_menu_func)
|
||||
from bpy.utils import unregister_class
|
||||
for cls in reversed(classes):
|
||||
unregister_class(cls)
|
||||
|
||||
Reference in New Issue
Block a user