import error in Blender 4.1

Issue #1991 duplicate
AnimaMachina created an issue

The new Blender 4.1 is out. But daz importer can’t import daz object on Blender 4.1. The “Auto Smooth” feature has been replaced on the new API. So there is an error on use_auto_smooth attribute. Here is trace :

Python : Traceback (most recent call last):
  File ".config/blender/4.1/scripts/addons/import_daz/error.py", line 223, in execute
    self.run(context)
  File ".config/blender/4.1/scripts/addons/import_daz/main.py", line 287, in run
    self.loadDazFile(filepath, context)
  File ".config/blender/4.1/scripts/addons/import_daz/main.py", line 161, in loadDazFile
    asset.build(context, inst)      # Builds armature
    ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".config/blender/4.1/scripts/addons/import_daz/figure.py", line 259, in build
    geonode.buildObject(context, inst, center)
  File ".config/blender/4.1/scripts/addons/import_daz/geometry.py", line 119, in buildObject
    Node.buildObject(self, context, inst, center)
  File ".config/blender/4.1/scripts/addons/import_daz/node.py", line 892, in buildObject
    ob,ob2 = self.data.buildData(context, self, inst, center)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".config/blender/4.1/scripts/addons/import_daz/geometry.py", line 1154, in buildData
    hasShells = self.addMaterials(me, geonode, context)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".config/blender/4.1/scripts/addons/import_daz/geometry.py", line 1286, in addMaterials
    self.addMaterial(dmat, mnum, me, geonode)
  File ".config/blender/4.1/scripts/addons/import_daz/geometry.py", line 1309, in addMaterial
    me.use_auto_smooth = dmat.getValue(["Smooth On"], False)
    ^^^^^^^^^^^^^^^^^^
AttributeError: 'Mesh' object has no attribute 'use_auto_smooth'

Perhaps you can get more informations to fix on following links …? (can’t find clear web code to fix such error …)

https://developer.blender.org/docs/release_notes/4.1/python_api/

https://projects.blender.org/blender/blender/issues/93551

ps: thanks for your work on this great add-on 😀

Comments (2)

  1. Thomas Larsson repo owner

    This is the same error as #1992, I think. The crash should be gone, but there might be a better way to handle smoothing.

  2. Log in to comment