Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
d6b4d11
Added support for Blender 5.2
LutBox Aug 3, 2026
d35adb7
Bfme Tool Integration
LutBox Aug 3, 2026
498d331
Merge remote-tracking branch 'upstream/master' into feature/bfme-tool…
LutBox Aug 8, 2026
615f6cb
Move the BfMe Modding panels into the 3D viewport sidebar
LutBox Aug 8, 2026
42bba01
Make the roundtrip tests independent of the local startup.blend
LutBox Aug 8, 2026
4402826
Merge duplicate materials across meshes on W3D/W3X import
LutBox Aug 8, 2026
a520388
Merge the BfMe panels into the existing 'W3D Tools' sidebar tab
LutBox Aug 8, 2026
4008bf2
Move Geometry Export into the Collision Geometry box
LutBox Aug 8, 2026
c5b4b3b
Stop existing-animation import from overwriting the current animation
LutBox Aug 8, 2026
3a2c8aa
Reference assets where they are instead of copying them into a cache
LutBox Aug 8, 2026
86e977f
Bring a model's skeleton and textures along when it is staged
LutBox Aug 8, 2026
b5188df
Find textures named in shader material properties too
LutBox Aug 8, 2026
edff18b
Apply the specular fixup in the core import operator, not just BfMe's…
LutBox Aug 9, 2026
6084147
Collapse W3D Tools sub-panels by default and auto-refresh the model b…
LutBox Aug 9, 2026
f5dfe58
Fix textures being shadowed by same-named .w3d files in the asset index
LutBox Aug 9, 2026
1f80cd3
Apply auto-refresh model list updates in batches, not all at once
LutBox Aug 9, 2026
425df59
Stop recomputing the model list's sort on every redraw
LutBox Aug 9, 2026
208dfb6
Scan the model list only at startup and on the button, never per redraw
LutBox Aug 10, 2026
abed2bd
Add automatic skeleton binding, rename Existing Animations to Binding…
LutBox Aug 10, 2026
bc37dd7
Fix multi-bone vertex weights not summing to 100% on export
LutBox Aug 10, 2026
fc70e29
Merge remote-tracking branch 'upstream/master' into feature/bfme-tool…
LutBox Aug 10, 2026
cc944ed
Calibrate Auto-Bind against real assets, white problem color, bone ma…
LutBox Aug 10, 2026
07a4a7b
Fix material deduplication being blocked by third-party addon properties
LutBox Aug 12, 2026
fd244e7
Bump version to 0.9.0
LutBox Aug 12, 2026
b42de2f
Fix W3D import crashing on non-UTF-8 strings from older exporters
LutBox Sep 13, 2026
96b3b57
Fix multi-second UI freeze when toggling Splitting Objects entries
LutBox Sep 13, 2026
daaaae2
Merge upstream/master (v0.7.4, Blender 5.2 support) into feature branch
LutBox Sep 16, 2026
be2941b
Use a submodule for pyBIG instead of copying its source in
LutBox Sep 16, 2026
31212f0
Fix model browser hiding models and dropping textures named like them
LutBox Sep 16, 2026
3517915
List same-named models from every asset source in the model browser
LutBox Sep 16, 2026
455d9de
Fix freezes when editing BfMe tool lists by moving the model list off…
LutBox Sep 17, 2026
c80e531
Fix HAM hierarchy naming, repeated-click action naming, Auto-Detect, …
LutBox Sep 17, 2026
7734990
Fix export corruption from non-ASCII characters in string fields
LutBox Sep 17, 2026
a2c7173
Fix Auto-Detect's recorded import path and correct its skeleton rule
LutBox Sep 17, 2026
73ac47c
Fix Blender 2.93 compatibility in the BfMe Show Weights visualisation
LutBox Sep 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
submodules: 'true'
- name: Bundle archive
run: |
zip -r io_mesh_w3d.zip io_mesh_w3d -x io_mesh_w3d/blender_addon_updater/.git
zip -r io_mesh_w3d.zip io_mesh_w3d -x io_mesh_w3d/blender_addon_updater/.git io_mesh_w3d/bfme/vendor/pyBIG/.git

- name: Create Release
id: create_release
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "io_mesh_w3d/blender_addon_updater"]
path = io_mesh_w3d/blender_addon_updater
url = https://github.com/OpenSAGE/blender-addon-updater.git
[submodule "io_mesh_w3d/bfme/vendor/pyBIG"]
path = io_mesh_w3d/bfme/vendor/pyBIG
url = https://github.com/ClementJ18/pyBIG.git
207 changes: 207 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ Supported Blender versions are 2.93 up to 5.2. On Blender 4.2 and newer the rele
can be dropped into Blender to install it as an extension, older versions install it as a legacy add-on
via *Edit > Preferences > Add-ons > Install*.

## BfMe Tools

The add-on also ships the BfMe modding tools (originally a separate add-on by Brechstange), found in the
3D viewport sidebar (press *N*) under the *W3D Tools* tab, alongside the geometry/bone-volume export
panel. They cover asset search paths and `.big` extraction,
a `.w3d` model browser with previews, finding animations that fit a skeleton, build-up and destroy
animation generators, UV/structure/collision-geometry/bone helpers and a simplified export panel.

## Setting up for development

Please see [Setting up for development](https://github.com/OpenSAGE/OpenSAGE.BlenderPlugin/wiki/Development-Setup)
Expand Down
27 changes: 14 additions & 13 deletions io_mesh_w3d/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
from .custom_properties import *
from .geometry_export import *
from .bone_volume_export import *
from .common.utils.material_import import flatten_materials, zero_specular

from . import bfme
from .blender_addon_updater import addon_updater_ops

VERSION = (0, 7, 4)
VERSION = (0, 9, 0)

# add-ons installed through the extension system (Blender 4.2+) live in the
# 'bl_ext' package and are kept up to date by Blender itself
Expand All @@ -22,7 +24,7 @@
bl_info = {
'name': 'Import/Export Westwood W3D Format (.w3d/.w3x)',
'author': 'OpenSage Developers',
'version': (0, 7, 4),
'version': (0, 9, 0),
"blender": (2, 90, 0),
'location': 'File > Import/Export > Westwood W3D (.w3d/.w3x)',
'description': 'Import or Export the Westwood W3D-Format (.w3d/.w3x)',
Expand Down Expand Up @@ -204,6 +206,8 @@ class ImportW3D(bpy.types.Operator, ImportHelper, ReportHelper):

def execute(self, context):
print_version(self.info)
objects_before = set(bpy.data.objects)

if self.filepath.lower().endswith('.w3d'):
from .w3d.import_w3d import load
file_format = 'W3D'
Expand All @@ -213,6 +217,9 @@ def execute(self, context):
file_format = 'W3X'
load(self)

imported = [obj for obj in bpy.data.objects if obj not in objects_before]
zero_specular(flatten_materials(imported))

self.info('finished')
return {'FINISHED'}

Expand Down Expand Up @@ -424,16 +431,6 @@ def draw(self, context):
col.prop(mat, 'multi_texture_enable')


class TOOLS_PANEL_PT_w3d(bpy.types.Panel):
bl_label = 'W3D Tools'
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'

def draw(self, context):
self.layout.operator('scene.export_geometry_data', icon='CUBE', text='Export Geometry Data')
self.layout.operator('scene.export_bone_volume_data', icon='BONE_DATA', text='Export Bone Volume Data')


class OBJECT_PT_DemoUpdaterPanel(bpy.types.Panel):
bl_label = 'Updater Demo Panel'
bl_idname = 'OBJECT_PT_hello'
Expand Down Expand Up @@ -518,7 +515,6 @@ def draw(self, context):
MATERIAL_PROPERTIES_PANEL_PT_w3d,
ExportGeometryData,
ExportBoneVolumeData,
TOOLS_PANEL_PT_w3d
)

# the bundled updater would overwrite the add-on behind Blender's back,
Expand Down Expand Up @@ -550,6 +546,9 @@ def register():

Material.shader = PointerProperty(type=ShaderProperties)

# the BfMe tools build on the operators and custom properties registered above
bfme.register()

bpy.types.TOPBAR_MT_file_import.append(menu_func_import)
bpy.types.TOPBAR_MT_file_export.append(menu_func_export)

Expand All @@ -561,6 +560,8 @@ def unregister():
for class_ in reversed(UPDATER_CLASSES):
bpy.utils.unregister_class(class_)

bfme.unregister()

for class_ in reversed(CLASSES):
bpy.utils.unregister_class(class_)
bpy.types.TOPBAR_MT_file_import.remove(menu_func_import)
Expand Down
45 changes: 45 additions & 0 deletions io_mesh_w3d/bfme/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# <pep8 compliant>
"""BfMe modding tools.

Originally a separate add-on built on top of the W3D importer/exporter, now part of
it: the tools call this add-on's own import and export operators directly and reuse
its custom mesh and material properties.
"""

from . import settings
from .tools import (
bindings,
bindings_and_animation,
build_up_animation,
destroy_animation,
existing_animations,
export_settings,
model_browser,
texture_finder,
w3d_tools)

# registration order within the 'W3D Tools' sidebar tab. 'bindings' and
# 'existing_animations' own no panel of their own, their operators and
# properties are drawn as the two sub-tabs of 'bindings_and_animation'
MODULES = (
texture_finder,
model_browser,
existing_animations,
bindings,
bindings_and_animation,
build_up_animation,
destroy_animation,
export_settings,
w3d_tools)


def register():
settings.register()
for module in MODULES:
module.register()


def unregister():
for module in reversed(MODULES):
module.unregister()
settings.unregister()
Loading
Loading