diff --git a/Arma3ObjectBuilder/CHANGELOG.md b/Arma3ObjectBuilder/CHANGELOG.md index 9159390..fdd475b 100644 --- a/Arma3ObjectBuilder/CHANGELOG.md +++ b/Arma3ObjectBuilder/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## [v2.3.2](https://github.com/MrClock8163/Arma3ObjectBuilder/releases/tag/v2.3.2) (Blender 2.90 -> 4.1) + +### Added + +- import-export: + - ASC import drag-and-drop support (Blender 4.1 and above) + - P3D import drag-and-drop support (Blender 4.1 and above) + - RTM import drag-and-drop support (Blender 4.1 and above) + - Skeleton import drag-and-drop support (Blender 4.1 and above) + ## [v2.3.1](https://github.com/MrClock8163/Arma3ObjectBuilder/releases/tag/v2.3.1) (Blender 2.90 -> 4.1) ### Fixed diff --git a/Arma3ObjectBuilder/__init__.py b/Arma3ObjectBuilder/__init__.py index 597e305..b49b16d 100644 --- a/Arma3ObjectBuilder/__init__.py +++ b/Arma3ObjectBuilder/__init__.py @@ -2,7 +2,7 @@ "name": "Arma 3 Object Builder", "description": "Collection of tools for editing Arma 3 content", "author": "MrClock (present add-on), Hans-Joerg \"Alwarren\" Frieden (original ArmaToolbox add-on)", - "version": (2, 3, 1), + "version": (2, 3, 2), "blender": (2, 90, 0), "location": "Object Builder panels", "warning": "Development", diff --git a/Arma3ObjectBuilder/ui/import_export_asc.py b/Arma3ObjectBuilder/ui/import_export_asc.py index 6c20c9a..a0d04fd 100644 --- a/Arma3ObjectBuilder/ui/import_export_asc.py +++ b/Arma3ObjectBuilder/ui/import_export_asc.py @@ -199,6 +199,18 @@ def draw(self, context): A3OB_PT_export_asc_dimensions ) +if bpy.app.version >= (4, 1, 0): + class A3OB_FH_import_asc(bpy.types.FileHandler): + bl_label = "File handler for ASC import" + bl_import_operator = "a3ob.import_asc" + bl_file_extensions = ".asc" + + @classmethod + def poll_drop(cls, context): + return context.area and context.area.type == 'VIEW_3D' + + classes = (*classes, A3OB_FH_import_asc) + def menu_func_import(self, context): self.layout.operator(A3OB_OP_import_asc.bl_idname, text="Esri Grid ASCII (.asc)") diff --git a/Arma3ObjectBuilder/ui/import_export_mcfg.py b/Arma3ObjectBuilder/ui/import_export_mcfg.py index 451fc8d..5800c12 100644 --- a/Arma3ObjectBuilder/ui/import_export_mcfg.py +++ b/Arma3ObjectBuilder/ui/import_export_mcfg.py @@ -165,6 +165,18 @@ def draw(self, context): A3OB_PT_export_mcfg_main ) +if bpy.app.version >= (4, 1, 0): + class A3OB_FH_import_mcfg(bpy.types.FileHandler): + bl_label = "File handler for MCFG import" + bl_import_operator = "a3ob.import_mcfg" + bl_file_extensions = ".cfg" + + @classmethod + def poll_drop(cls, context): + return context.area and context.area.type == 'VIEW_3D' + + classes = (*classes, A3OB_FH_import_mcfg) + def menu_func_import(self, context): self.layout.operator(A3OB_OP_import_mcfg.bl_idname, text="Arma 3 skeletons (model.cfg)") diff --git a/Arma3ObjectBuilder/ui/import_export_p3d.py b/Arma3ObjectBuilder/ui/import_export_p3d.py index a8d2d30..c6651a5 100644 --- a/Arma3ObjectBuilder/ui/import_export_p3d.py +++ b/Arma3ObjectBuilder/ui/import_export_p3d.py @@ -506,6 +506,18 @@ def draw(self, context): A3OB_PT_export_p3d_post ) +if bpy.app.version >= (4, 1, 0): + class A3OB_FH_import_p3d(bpy.types.FileHandler): + bl_label = "File handler for P3D import" + bl_import_operator = "a3ob.import_p3d" + bl_file_extensions = ".p3d" + + @classmethod + def poll_drop(cls, context): + return context.area and context.area.type == 'VIEW_3D' + + classes = (*classes, A3OB_FH_import_p3d) + def menu_func_import(self, context): self.layout.operator(A3OB_OP_import_p3d.bl_idname, text="Arma 3 model (.p3d)") diff --git a/Arma3ObjectBuilder/ui/import_export_rtm.py b/Arma3ObjectBuilder/ui/import_export_rtm.py index 76829d1..879d4e9 100644 --- a/Arma3ObjectBuilder/ui/import_export_rtm.py +++ b/Arma3ObjectBuilder/ui/import_export_rtm.py @@ -185,13 +185,6 @@ def draw(self, context): layout.prop(operator, "frame_count") - # layout.prop(operator, "clamp") - # col = layout.column(align=True) - # col.prop(operator, "frame_start") - # col.prop(operator, "frame_end") - # col.enabled = operator.clamp - - class A3OB_OP_import_rtm(bpy.types.Operator, bpy_extras.io_utils.ImportHelper): """Import action from Arma 3 RTM""" @@ -364,6 +357,18 @@ def draw(self, context): A3OB_PT_import_rtm_mapping ) +if bpy.app.version >= (4, 1, 0): + class A3OB_FH_import_rtm(bpy.types.FileHandler): + bl_label = "File handler for RTM import" + bl_import_operator = "a3ob.import_rtm" + bl_file_extensions = ".rtm" + + @classmethod + def poll_drop(cls, context): + return context.area and context.area.type == 'VIEW_3D' + + classes = (*classes, A3OB_FH_import_rtm) + def menu_func_export(self, context): self.layout.operator(A3OB_OP_export_rtm.bl_idname, text="Arma 3 animation (.rtm)")