bonjorno7 / SourceOps

A more convenient alternative to Blender Source Tools.
GNU General Public License v3.0
147 stars 14 forks source link

Can't export SMD in Blender 4.2 #94

Closed 14bit closed 3 months ago

14bit commented 3 months ago

Blender removed the "Keep Custom Normals" checkbox on the Triangulate Modifier in 4.2, and that is now the default behavior. This causes exports with SourceOps to fail, since from what I can tell it tries to set that checkbox that no longer exists:

Python: Traceback (most recent call last):
  File "C:\Users\Username\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\SourceOps\addon\ops\export_meshes.py", line 31, in invoke
    error = source_model.export_meshes()
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Username\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\SourceOps\addon\types\model_export\model.py", line 88, in export_meshes
    self.export_mesh(self.armature, objects, path)
  File "C:\Username\Username\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\SourceOps\addon\types\model_export\model.py", line 113, in export_mesh
    self.export_smd(armature, objects, None, path)
  File "C:\Users\Username\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\SourceOps\addon\types\model_export\model.py", line 126, in export_smd
    smd.from_blender(armature, objects, action)
  File "C:\Users\Username\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\SourceOps\addon\types\model_export\smd.py", line 435, in from_blender
    self.triangles.from_blender(self.lookup, armature, object)
  File "C:\Users\Username\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\SourceOps\addon\types\model_export\smd.py", line 358, in from_blender
    mod.keep_custom_normals = True
    ^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TriangulateModifier' object has no attribute 'keep_custom_normals'
bonjorno7 commented 3 months ago

I fixed this 20 days ago, but forgot to publish a release with that commit. I'll have to get on that later this evening.

bonjorno7 commented 3 months ago

Better late than never I suppose.