Skip to content

Commit

Permalink
Merge pull request #59 from MrClock8163/dev
Browse files Browse the repository at this point in the history
v2.3.2
  • Loading branch information
MrClock8163 authored May 14, 2024
2 parents b7c34ef + 565c975 commit e3ab935
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 8 deletions.
10 changes: 10 additions & 0 deletions Arma3ObjectBuilder/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion Arma3ObjectBuilder/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
12 changes: 12 additions & 0 deletions Arma3ObjectBuilder/ui/import_export_asc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)")
Expand Down
12 changes: 12 additions & 0 deletions Arma3ObjectBuilder/ui/import_export_mcfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)")
Expand Down
12 changes: 12 additions & 0 deletions Arma3ObjectBuilder/ui/import_export_p3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)")
Expand Down
19 changes: 12 additions & 7 deletions Arma3ObjectBuilder/ui/import_export_rtm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""

Expand Down Expand Up @@ -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)")
Expand Down

0 comments on commit e3ab935

Please sign in to comment.