Skip to content

Added support for Blender 5.2 - #279

Merged
Tarcontar merged 3 commits into
OpenSAGE:masterfrom
LutBox:feature/blender-5.2-support
Aug 13, 2026
Merged

Tarcontar merged 3 commits into
OpenSAGE:masterfrom
LutBox:feature/blender-5.2-support

Conversation

@LutBox

@LutBox LutBox commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Verified against Blender 5.2.0 LTS (Python 3.13): the full test suite, an install as extension and as legacy add-on, and a W3D/W3X export and re-import roundtrip.

Replace all deprecated API usage, so the add-on no longer emits a single deprecation warning on 5.2:

  • Material.blend_method -> Material.surface_render_method. The old property has no effect in EEVEE Next, so transparency of imported materials was silently lost since Blender 4.2.
  • Material.show_transparent_back -> Material.use_transparency_overlap
  • Material.use_nodes, which gets removed in Blender 6.0. The node tree is only requested when the material does not have one yet.
  • Mesh.vertex_colors -> Mesh.color_attributes
  • MeshUVLoopLayer.data -> MeshUVLoopLayer.uv

All of them go through version guarded helpers, the add-on keeps working on the older Blender versions the CI covers.

Make the add-on installable as an extension:

  • add blender_manifest.toml, the released archive now works both as an extension (Blender 4.2+) and as a legacy add-on archive.
  • use relative imports inside the package. As an extension the package is named bl_ext..io_mesh_w3d, so the absolute io_mesh_w3d.* imports failed to resolve and enabling the add-on errored out.
  • skip the bundled updater when running as an extension, extensions are updated through their repository instead.

Bugfixes found along the way:

  • import crashed on Blender 4.1: Mesh.use_auto_smooth was removed in 4.1, not in 4.2 as the version guard assumed.
  • w3x writing relied on the truth value of an xml element, which is deprecated in Python and will always be True in a future version. Reading it as a child count keeps the intended meaning.

Verified against Blender 5.2.0 LTS (Python 3.13): the full test suite,
an install as extension and as legacy add-on, and a W3D/W3X export and
re-import roundtrip.

Replace all deprecated API usage, so the add-on no longer emits a single
deprecation warning on 5.2:

* Material.blend_method -> Material.surface_render_method. The old
  property has no effect in EEVEE Next, so transparency of imported
  materials was silently lost since Blender 4.2.
* Material.show_transparent_back -> Material.use_transparency_overlap
* Material.use_nodes, which gets removed in Blender 6.0. The node tree
  is only requested when the material does not have one yet.
* Mesh.vertex_colors -> Mesh.color_attributes
* MeshUVLoopLayer.data -> MeshUVLoopLayer.uv

All of them go through version guarded helpers, the add-on keeps working
on the older Blender versions the CI covers.

Make the add-on installable as an extension:

* add blender_manifest.toml, the released archive now works both as an
  extension (Blender 4.2+) and as a legacy add-on archive.
* use relative imports inside the package. As an extension the package
  is named bl_ext.<repo>.io_mesh_w3d, so the absolute io_mesh_w3d.*
  imports failed to resolve and enabling the add-on errored out.
* skip the bundled updater when running as an extension, extensions are
  updated through their repository instead.

Bugfixes found along the way:

* import crashed on Blender 4.1: Mesh.use_auto_smooth was removed in
  4.1, not in 4.2 as the version guard assumed.
* w3x writing relied on the truth value of an xml element, which is
  deprecated in Python and will always be True in a future version.
  Reading it as a child count keeps the intended meaning.
@Tarcontar

Copy link
Copy Markdown
Collaborator

Looks good to me, great job, thanks! :)

@Tarcontar

Copy link
Copy Markdown
Collaborator

@LutBox please rebase on current master branch so the CI can run

@Tarcontar

Copy link
Copy Markdown
Collaborator

@LutBox sorry i made a mistake with the URL, now it is fixed on master branch and CI finally works again, could you please rebase once more?

@Tarcontar
Tarcontar merged commit 53d77d3 into OpenSAGE:master Aug 13, 2026
4 checks passed
LutBox added a commit to LutBox/OpenSAGE.BlenderPlugin that referenced this pull request Sep 16, 2026
Resolves the conflicts the maintainer asked about after OpenSAGE#279 was merged.
Both sides had independently added Blender 5.2 support and their own
blender_manifest.toml, so every conflict was the same work appearing
twice; the merged tree is identical to this branch's content.

Resolutions:
- version stays 0.9.0 (this branch), not master's 0.7.4
- TOOLS_PANEL_PT_w3d is not reinstated: this branch replaced it with
  W3D_TOOLS_PT_panel, which offers the same two operators, and the class
  no longer exists here, so keeping master's CLASSES entry would raise
  NameError on register
- CHANGELOG keeps the v0.9.0 section above master's v0.7.4 section
- README keeps the BfMe Tools section

Full test suite passes headless (529 tests).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants