0xafbf / blender-datasmith-export

Blender addon to export UE4 Datasmith format
GNU General Public License v3.0
401 stars 52 forks source link

PBR material blocks export #63

Open Twein2 opened 1 year ago

Twein2 commented 1 year ago

I have a fairly simple PBR material generated depending on a slope. Without this material everything exports fine.

image

Here is a blend file https://we.tl/t-qqVmHAzupT

Microsoft Edge says: The error message AttributeError: 'NoneType' object has no attribute 'items' suggests that the variable expressions is None when the code is trying to access its items attribute. This could be due to the variable not being properly initialized or assigned a value before this line of code is executed. You may want to check the code to see where the variable expressions is defined and make sure it is assigned a value before this line of code is executed.

Blender says: _Python: Traceback (most recent call last): File "C:\Users...\AppData\Roaming\Blender Foundation\Blender\3.5\scripts\addons\blender-datasmith-export-master__init__.py", line 101, in execute return export_datasmith.save(context, **keywords) File "C:\Users...\AppData\Roaming\Blender Foundation\Blender\3.5\scripts\addons\blender-datasmith-export-master\export_datasmith.py", line 2458, in save collect_and_save(context, kwargs, basepath) File "C:\Users...\AppData\Roaming\Blender Foundation\Blender\3.5\scripts\addons\blender-datasmith-export-master\export_datasmith.py", line 2345, in collect_and_save material_nodes = [collect_pbr_material(mat) for mat in unique_materials] File "C:\Users...\AppData\Roaming\Blender Foundation\Blender\3.5\scripts\addons\blender-datasmith-export-master\export_datasmith.py", line 2345, in material_nodes = [collect_pbr_material(mat) for mat in unique_materials] File "C:\Users...\AppData\Roaming\Blender Foundation\Blender\3.5\scripts\addons\blender-datasmith-export-master\export_datasmith.py", line 1462, in collect_pbr_material return pbr_nodetree_material(material) File "C:\Users...\AppData\Roaming\Blender Foundation\Blender\3.5\scripts\addons\blender-datasmith-export-master\export_datasmith.py", line 1389, in pbr_nodetreematerial for key, value in expressions.items(): AttributeError: 'NoneType' object has no attribute 'items'

SuddenDevelopment commented 1 year ago

this makes sense, I think it only knows what to do with basic BSDF materials.