Import errors on UV for custom models

Issue #65 resolved
Noname created an issue

As in title, when importing presets for model Rodents by AM error regarding UV layers happens:

Traceback (most recent call last):
  File "C:\Users\user\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\Diffeomorphic-import-daz-9ba4cff98646\error.py", line 187, in execute
    self.run(context)
  File "C:\Users\user\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\Diffeomorphic-import-daz-9ba4cff98646\daz.py", line 48, in run
    getMainAsset(self.filepath, context, self)
  File "C:\Users\user\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\Diffeomorphic-import-daz-9ba4cff98646\main.py", line 100, in getMainAsset
    asset.postbuild(context, inst)
  File "C:\Users\user\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\Diffeomorphic-import-daz-9ba4cff98646\node.py", line 636, in postbuild
    geonode.postbuild(context, inst)
  File "C:\Users\user\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\Diffeomorphic-import-daz-9ba4cff98646\geometry.py", line 138, in postbuild
    pruneUvMaps(self.rna)
  File "C:\Users\user\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\Diffeomorphic-import-daz-9ba4cff98646\geometry.py", line 655, in pruneUvMaps
    if len(getUvTextures(ob.data)) <= 1:
  File "C:\Users\user\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\Diffeomorphic-import-daz-9ba4cff98646\utils.py", line 167, in getUvTextures
    return me.uv_layers
AttributeError: 'NoneType' object has no attribute 'uv_layers'

location: <unknown location>:-1

Model seams to load just fine, didn’t seen anything strange going on with textures etc.

Fur is missing of course so I don’t know if now importer should support Daz → Blender fur conversion or not.

Comments (8)

  1. Noname reporter

    Importing poses to that custom rig also cause i.e. for a pose that should indicate that squirl holds something “hands” in blender move further apart then in blender.

  2. Thomas Larsson repo owner

    The latest commit evades this error. However, the root cause is that some objects have not been built, there will probably be further problems down the line.

  3. Noname reporter

    Seams like poses also import correctly, will do more testing over weekend.

    Also, and this do apply to all meshes, they don’t have smooth shading set. This is probably recent thing IIRC meshes were smooth in the past.

  4. Thomas Larsson repo owner

    About smooth shading. Now a mesh has flat shading if it is saved at base resolution and smooth shading if it is saved at high resolution. Not sure if that is correct, but I found not other way to make the distinction. And I think that a primitive cube should be flat shaded.

  5. Log in to comment