bonjorno7 / SourceOps

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

Cant export VMF Displacements in 4.x #92

Open DeffOS opened 7 months ago

DeffOS commented 7 months ago

Face maps fazed out in 4.x versions in favor of Attributes system https://projects.blender.org/blender/blender/issues/105317

AttributeError: 'Object' object has no attribute 'face_maps'
Error: Python: Traceback (most recent call last):
  File "C:\Users\username\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceOps-main\addon\ops\export_vmf.py", line 67, in invoke
    vmf = VMF(settings)
          ^^^^^^^^^^^^^
  File "C:\Users\username\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceOps-main\addon\types\map_export\vmf.py", line 35, in __init__
    displacement_solids = displacement.convert_objects(settings, settings.disp_objects)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\username\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceOps-main\addon\types\map_export\displacement.py", line 343, in convert_objects
    result = convert_object(settings, obj)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\username\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceOps-main\addon\types\map_export\displacement.py", line 192, in convert_object
    face_maps = setup_face_maps(obj_subd)
                ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\username\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceOps-main\addon\types\map_export\displacement.py", line 87, in setup_face_maps
    obj.face_maps.clear()
    ^^^^^^^^^^^^^
AttributeError: 'Object' object has no attribute 'face_maps'
bonjorno7 commented 7 months ago

Oh yeah I noticed that. I'll see if I can fix it in a way that doesn't break support for older versions.