diff --git a/io_scene_ase/__init__.py b/io_scene_ase/__init__.py index 696d845..c119dd3 100644 --- a/io_scene_ase/__init__.py +++ b/io_scene_ase/__init__.py @@ -1,15 +1,3 @@ -bl_info = { - 'name': 'ASCII Scene Export (ASE)', - 'description': 'Export ASE (ASCII Scene Export) files', - 'author': 'Colin Basnett (Darklight Games)', - 'version': (2, 1, 0), - 'blender': (4, 1, 0), - 'location': 'File > Import-Export', - 'tracker_url': 'https://github.com/DarklightGames/io_scene_ase/issues', - 'support': 'COMMUNITY', - 'category': 'Import-Export' -} - if 'bpy' in locals(): import importlib if 'ase' in locals(): importlib.reload(ase) diff --git a/io_scene_ase/blender_manifest.toml b/io_scene_ase/blender_manifest.toml new file mode 100644 index 0000000..bdfe014 --- /dev/null +++ b/io_scene_ase/blender_manifest.toml @@ -0,0 +1,27 @@ +schema_version = "1.0.0" +id = "io_scene_ase" +version = "2.1.0" +name = "ASCII Scene Export (.ase)" +tagline = "Import and export PSK and PSA files used in Unreal Engine" +maintainer = "Colin Basnett " +type = "add-on" +website = "https://github.com/DarklightGames/io_scene_ase/" +tags = ["Game Engine", "Import-Export"] +blender_version_min = "4.2.0" +# Optional: maximum supported Blender version +# blender_version_max = "5.1.0" +license = [ + "SPDX:GPL-3.0-or-later", +] + +[build] +paths_exclude_pattern = [ + "/.git/", + "__pycache__/", + "/venv/", + "/.github/", + ".gitignore", +] + +[permissions] +files = "Import/export ASE files from/to disk" diff --git a/io_scene_ase/builder.py b/io_scene_ase/builder.py index 7baee9c..03310e3 100644 --- a/io_scene_ase/builder.py +++ b/io_scene_ase/builder.py @@ -2,7 +2,7 @@ from typing import Iterable, Optional, List, Tuple from bpy.types import Object, Context, Material -from .ase import * +from .ase import ASE, ASEGeometryObject, ASEFace, ASEFaceNormal, ASEVertexNormal, ASEUVLayer, is_collision_name import bpy import bmesh import math diff --git a/io_scene_ase/exporter.py b/io_scene_ase/exporter.py index 987bd1f..fa0b62e 100644 --- a/io_scene_ase/exporter.py +++ b/io_scene_ase/exporter.py @@ -1,11 +1,11 @@ import os.path -import typing +from typing import Iterable, List, Set, Union from bpy_extras.io_utils import ExportHelper from bpy.props import StringProperty, BoolProperty, CollectionProperty, PointerProperty, IntProperty -from bpy.types import Operator, Material, PropertyGroup, UIList -from .builder import * -from .writer import * +from bpy.types import Operator, Material, PropertyGroup, UIList, Object +from .builder import ASEBuilder, ASEBuilderOptions, ASEBuilderError, get_mesh_objects +from .writer import ASEWriter class ASE_PG_material(PropertyGroup): @@ -108,7 +108,7 @@ class ASE_OT_export(Operator, ExportHelper): if advanced_panel: advanced_panel.prop(self, 'use_raw_mesh_data') - def invoke(self, context: 'Context', event: 'Event' ) -> typing.Union[typing.Set[str], typing.Set[int]]: + def invoke(self, context: 'Context', event: 'Event' ) -> Union[Set[str], Set[int]]: mesh_objects = [x[0] for x in get_mesh_objects(context.selected_objects)] pg = getattr(context.scene, 'ase_export') @@ -134,7 +134,7 @@ class ASE_OT_export(Operator, ExportHelper): class ASE_OT_export_collections(Operator, ExportHelper): - bl_idname = 'io_scene_ase.ase_export_collections' # important since its how bpy.ops.import_test.some_data is constructed + bl_idname = 'io_scene_ase.ase_export_collections' bl_label = 'Export Collections to ASE' bl_space_type = 'PROPERTIES' bl_region_type = 'WINDOW' @@ -169,8 +169,6 @@ class ASE_OT_export_collections(Operator, ExportHelper): # Get all the materials used by the objects in the collection. options.materials = get_unique_materials([x[0] for x in mesh_objects]) - print(collection, options.materials) - try: ase = ASEBuilder().build(context, options, collection.all_objects) dirname = os.path.dirname(self.filepath) diff --git a/io_scene_ase/writer.py b/io_scene_ase/writer.py index 1407ec6..963e423 100644 --- a/io_scene_ase/writer.py +++ b/io_scene_ase/writer.py @@ -1,6 +1,3 @@ -from .ase import * - - class ASEFile(object): def __init__(self): self.commands = []