phonon / blender-vintagestory-json

Blender Vintage Story .json model importer/exporter
MIT License
15 stars 3 forks source link

Plugin imports well but has problems exporting #6

Open Guartis opened 1 year ago

Guartis commented 1 year ago

Error Message:

Python: Traceback (most recent call last): File "E:\SteamLibrary\steamapps\common\Blender\4.0\scripts\addons\blender-vintagestory-json-master\io_scene_vintagestory_json__init__.py", line 268, in execute result = export_vintagestory_json.save(context, args) File "E:\SteamLibrary\steamapps\common\Blender\4.0\scripts\addons\blender-vintagestory-json-master\io_scene_vintagestory_json\export_vintagestory_json.py", line 1861, in save save_objects(filepath, objects, kwargs) File "E:\SteamLibrary\steamapps\common\Blender\4.0\scripts\addons\blender-vintagestory-json-master\io_scene_vintagestory_json\export_vintagestory_json.py", line 1657, in save_objects element = generate_element( File "E:\SteamLibrary\steamapps\common\Blender\4.0\scripts\addons\blender-vintagestory-json-master\io_scene_vintagestory_json\export_vintagestory_json.py", line 637, in generate_element face_material = get_face_material(obj, face.material_index) File "E:\SteamLibrary\steamapps\common\Blender\4.0\scripts\addons\blender-vintagestory-json-master\io_scene_vintagestory_json\export_vintagestory_json.py", line 321, in get_face_material name=material.name, UnboundLocalError: local variable 'material' referenced before assignment

sekelsta commented 9 months ago

This seems to happen for shapes without included texture info. For a workaround, you can manually set a material for each box in blender before exporting.