Kruithne / wow.export

📦 Export Toolkit for World of Warcraft
MIT License
288 stars 54 forks source link

[Blender Add-On] No specular found on OBJ import #402

Closed jae1911 closed 11 months ago

jae1911 commented 11 months ago

Hey there! When trying to import an OBJ exported with wow.export to Blender using the addon (File -> Import -> WoW M2...), I will get the following error:

Python: Traceback (most recent call last):
  File "C:\Users\me\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\io_scene_wowobj\__init__.py", line 100, in execute
    import_wowobj.importWoWOBJAddon(os.path.join(self.directory, importFile.name), settings)
  File "C:\Users\me\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\io_scene_wowobj\import_wowobj.py", line 10, in importWoWOBJAddon
    importWoWOBJ(objectFile, None, settings)
  File "C:\Users\me\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\io_scene_wowobj\import_wowobj.py", line 172, in importWoWOBJ
    principled.inputs['Specular'].default_value = 0
KeyError: 'bpy_prop_collection[key]: key "Specular" not found'

Reproduction steps:

  1. Open wow.export
  2. Search for world/wmo/azeroth/buildings/stormwind/stormwind.wmo
  3. Export OBJ (also tested while checking the Doodad Sets)
  4. Open Blender
  5. Try importing the file stormwind.obj
  6. Exception happens

Note that it doesn't only happen on the wmo specified in the reproduction steps but with anything here.
I fear it might just be that my Blender version might be too recent.

Info:

briochie commented 11 months ago

I believe this has already been fixed in the main branch. It just hasn't been released yet.

This PR already addressed this issue: https://github.com/Kruithne/wow.export/pull/399

@jae1911 I recommend pulling the current branch and extracting the Blender addon package from that.

jae1911 commented 11 months ago

Oh, my bad then, thanks!