Skip to content

Commit e3ab935

Browse files
authored
Merge pull request #59 from MrClock8163/dev
v2.3.2
2 parents b7c34ef + 565c975 commit e3ab935

File tree

6 files changed

+59
-8
lines changed

6 files changed

+59
-8
lines changed

Arma3ObjectBuilder/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Changelog
22

3+
## [v2.3.2](https://github.com/MrClock8163/Arma3ObjectBuilder/releases/tag/v2.3.2) (Blender 2.90 -> 4.1)
4+
5+
### Added
6+
7+
- import-export:
8+
- ASC import drag-and-drop support (Blender 4.1 and above)
9+
- P3D import drag-and-drop support (Blender 4.1 and above)
10+
- RTM import drag-and-drop support (Blender 4.1 and above)
11+
- Skeleton import drag-and-drop support (Blender 4.1 and above)
12+
313
## [v2.3.1](https://github.com/MrClock8163/Arma3ObjectBuilder/releases/tag/v2.3.1) (Blender 2.90 -> 4.1)
414

515
### Fixed

Arma3ObjectBuilder/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "Arma 3 Object Builder",
33
"description": "Collection of tools for editing Arma 3 content",
44
"author": "MrClock (present add-on), Hans-Joerg \"Alwarren\" Frieden (original ArmaToolbox add-on)",
5-
"version": (2, 3, 1),
5+
"version": (2, 3, 2),
66
"blender": (2, 90, 0),
77
"location": "Object Builder panels",
88
"warning": "Development",

Arma3ObjectBuilder/ui/import_export_asc.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,18 @@ def draw(self, context):
199199
A3OB_PT_export_asc_dimensions
200200
)
201201

202+
if bpy.app.version >= (4, 1, 0):
203+
class A3OB_FH_import_asc(bpy.types.FileHandler):
204+
bl_label = "File handler for ASC import"
205+
bl_import_operator = "a3ob.import_asc"
206+
bl_file_extensions = ".asc"
207+
208+
@classmethod
209+
def poll_drop(cls, context):
210+
return context.area and context.area.type == 'VIEW_3D'
211+
212+
classes = (*classes, A3OB_FH_import_asc)
213+
202214

203215
def menu_func_import(self, context):
204216
self.layout.operator(A3OB_OP_import_asc.bl_idname, text="Esri Grid ASCII (.asc)")

Arma3ObjectBuilder/ui/import_export_mcfg.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,18 @@ def draw(self, context):
165165
A3OB_PT_export_mcfg_main
166166
)
167167

168+
if bpy.app.version >= (4, 1, 0):
169+
class A3OB_FH_import_mcfg(bpy.types.FileHandler):
170+
bl_label = "File handler for MCFG import"
171+
bl_import_operator = "a3ob.import_mcfg"
172+
bl_file_extensions = ".cfg"
173+
174+
@classmethod
175+
def poll_drop(cls, context):
176+
return context.area and context.area.type == 'VIEW_3D'
177+
178+
classes = (*classes, A3OB_FH_import_mcfg)
179+
168180

169181
def menu_func_import(self, context):
170182
self.layout.operator(A3OB_OP_import_mcfg.bl_idname, text="Arma 3 skeletons (model.cfg)")

Arma3ObjectBuilder/ui/import_export_p3d.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,18 @@ def draw(self, context):
506506
A3OB_PT_export_p3d_post
507507
)
508508

509+
if bpy.app.version >= (4, 1, 0):
510+
class A3OB_FH_import_p3d(bpy.types.FileHandler):
511+
bl_label = "File handler for P3D import"
512+
bl_import_operator = "a3ob.import_p3d"
513+
bl_file_extensions = ".p3d"
514+
515+
@classmethod
516+
def poll_drop(cls, context):
517+
return context.area and context.area.type == 'VIEW_3D'
518+
519+
classes = (*classes, A3OB_FH_import_p3d)
520+
509521

510522
def menu_func_import(self, context):
511523
self.layout.operator(A3OB_OP_import_p3d.bl_idname, text="Arma 3 model (.p3d)")

Arma3ObjectBuilder/ui/import_export_rtm.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -185,13 +185,6 @@ def draw(self, context):
185185
layout.prop(operator, "frame_count")
186186

187187

188-
# layout.prop(operator, "clamp")
189-
# col = layout.column(align=True)
190-
# col.prop(operator, "frame_start")
191-
# col.prop(operator, "frame_end")
192-
# col.enabled = operator.clamp
193-
194-
195188
class A3OB_OP_import_rtm(bpy.types.Operator, bpy_extras.io_utils.ImportHelper):
196189
"""Import action from Arma 3 RTM"""
197190

@@ -364,6 +357,18 @@ def draw(self, context):
364357
A3OB_PT_import_rtm_mapping
365358
)
366359

360+
if bpy.app.version >= (4, 1, 0):
361+
class A3OB_FH_import_rtm(bpy.types.FileHandler):
362+
bl_label = "File handler for RTM import"
363+
bl_import_operator = "a3ob.import_rtm"
364+
bl_file_extensions = ".rtm"
365+
366+
@classmethod
367+
def poll_drop(cls, context):
368+
return context.area and context.area.type == 'VIEW_3D'
369+
370+
classes = (*classes, A3OB_FH_import_rtm)
371+
367372

368373
def menu_func_export(self, context):
369374
self.layout.operator(A3OB_OP_export_rtm.bl_idname, text="Arma 3 animation (.rtm)")

0 commit comments

Comments
 (0)