Error in OBJ exporter if material has a normal map #60238

Closed
opened 2019-01-06 17:42:53 +01:00 by Aleksi Juvani · 3 comments

Blender Version
Broken: 2.80, 4b7596ec914e, 2019-01-05 20:52

Short description of error

Traceback (most recent call last):
  File "C:\blender-2.80.0-git.4b7596ec914e-windows64\2.80\scripts\addons\io_scene_obj\__init__.py", line 310, in execute
    return export_obj.save(context, **keywords)
  File "C:\blender-2.80.0-git.4b7596ec914e-windows64\2.80\scripts\addons\io_scene_obj\export_obj.py", line 797, in save
    EXPORT_PATH_MODE=path_mode,
  File "C:\blender-2.80.0-git.4b7596ec914e-windows64\2.80\scripts\addons\io_scene_obj\export_obj.py", line 739, in _write
    progress,
  File "C:\blender-2.80.0-git.4b7596ec914e-windows64\2.80\scripts\addons\io_scene_obj\export_obj.py", line 657, in write_file
    write_mtl(scene, mtlfilepath, EXPORT_PATH_MODE, copy_set, mtl_dict)
  File "C:\blender-2.80.0-git.4b7596ec914e-windows64\2.80\scripts\addons\io_scene_obj\export_obj.py", line 141, in write_mtl
    if mat_wrap.normalmap_strengh != 1.0:
AttributeError: 'PrincipledBSDFWrapper' object has no attribute 'normalmap_strengh'

location: <unknown location>:-1

If a model contains a material with the surface set to "Principled BSDF" (actually I'm not sure if the surface type even matters) and the material has a normal map, the exporter will error with the above. It looks to me that this is because normalmap_strength has been mistyped as normalmap_strengh.

Exact steps for others to reproduce the error

  1. Open the attached .blend file
    obj_export_normal_map_bug.blend
  2. Try exporting the file as OBJ with "Write Materials" enabled
  3. The exporter will error
**Blender Version** Broken: 2.80, 4b7596ec914e, 2019-01-05 20:52 **Short description of error** ``` Traceback (most recent call last): File "C:\blender-2.80.0-git.4b7596ec914e-windows64\2.80\scripts\addons\io_scene_obj\__init__.py", line 310, in execute return export_obj.save(context, **keywords) File "C:\blender-2.80.0-git.4b7596ec914e-windows64\2.80\scripts\addons\io_scene_obj\export_obj.py", line 797, in save EXPORT_PATH_MODE=path_mode, File "C:\blender-2.80.0-git.4b7596ec914e-windows64\2.80\scripts\addons\io_scene_obj\export_obj.py", line 739, in _write progress, File "C:\blender-2.80.0-git.4b7596ec914e-windows64\2.80\scripts\addons\io_scene_obj\export_obj.py", line 657, in write_file write_mtl(scene, mtlfilepath, EXPORT_PATH_MODE, copy_set, mtl_dict) File "C:\blender-2.80.0-git.4b7596ec914e-windows64\2.80\scripts\addons\io_scene_obj\export_obj.py", line 141, in write_mtl if mat_wrap.normalmap_strengh != 1.0: AttributeError: 'PrincipledBSDFWrapper' object has no attribute 'normalmap_strengh' location: <unknown location>:-1 ``` If a model contains a material with the surface set to "Principled BSDF" (actually I'm not sure if the surface type even matters) and the material has a normal map, the exporter will error with the above. It looks to me that this is because `normalmap_strength` has been mistyped as `normalmap_strengh`. **Exact steps for others to reproduce the error** 1. Open the attached .blend file [obj_export_normal_map_bug.blend](https://archive.blender.org/developer/F6200633/obj_export_normal_map_bug.blend) 2. Try exporting the file as OBJ with "Write Materials" enabled 3. The exporter will error
Author

Added subscriber: @aleksijuvani

Added subscriber: @aleksijuvani
Bastien Montagne self-assigned this 2019-01-06 18:11:21 +01:00

This issue was referenced by 6f43027fdd

This issue was referenced by 6f43027fdde5724980fc26dd4f740aa78205b6e7

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#60238
No description provided.