Failed to import DAZ file: KeyError: key "Cycles" not found
plugin version: current master
blender version: 2.91 beta
Tried to import DAZ file, got an error:
Python: Traceback (most recent call last):
File "/home/u1/.config/blender/2.91/scripts/addons/Diffeomorphic-import_daz-c2a7893dc029/error.py", line 247, in execute
self.run(context)
File "/home/u1/.config/blender/2.91/scripts/addons/Diffeomorphic-import_daz-c2a7893dc029/daz.py", line 48, in run
getMainAsset(self.filepath, context, self)
File "/home/u1/.config/blender/2.91/scripts/addons/Diffeomorphic-import_daz-c2a7893dc029/main.py", line 81, in getMainAsset
asset.build(context)
File "/home/u1/.config/blender/2.91/scripts/addons/Diffeomorphic-import_daz-c2a7893dc029/cycles.py", line 62, in build
self.tree.build(context)
File "/home/u1/.config/blender/2.91/scripts/addons/Diffeomorphic-import_daz-c2a7893dc029/cycles.py", line 271, in build
self.buildLayer(context)
File "/home/u1/.config/blender/2.91/scripts/addons/Diffeomorphic-import_daz-c2a7893dc029/pbr.py", line 67, in buildLayer
if self.buildOverlay():
File "/home/u1/.config/blender/2.91/scripts/addons/Diffeomorphic-import_daz-c2a7893dc029/cycles.py", line 506, in buildOverlay
self.mixWithActive(weight**power, wttex, node)
File "/home/u1/.config/blender/2.91/scripts/addons/Diffeomorphic-import_daz-c2a7893dc029/cycles.py", line 1154, in mixWithActive
self.makeActiveMix("Cycles", self.cycles, self.getCyclesSocket(), fac, tex, shader, useAlpha, flip)
File "/home/u1/.config/blender/2.91/scripts/addons/Diffeomorphic-import_daz-c2a7893dc029/cycles.py", line 1159, in makeActiveMix
self.links.new(socket, shader.inputs[slot])
KeyError: 'bpy_prop_collection[key]: key "Cycles" not found'
location: <unknown location>:-1
Comments (4)
-
reporter -
repo owner The plugin reuses node groups that it has created (whose name starts with “Daz”) to avoid making multiple copies of the same node group. This means that if you change one of those node groups, unexpected things may happen. The short answer is: Don’t do that. But the plugin could check that all sockets are in place, and if the aren’t regenerate the node group. Will fix that tonight.
-
repo owner The latest commit implements this check.
-
repo owner - changed status to resolved
- Log in to comment
This exception raised only when I import to the bender scene, which already has another previously imported daz character, and I already changed some shader nodes in it.
Importing to the new blank blender scene works fine.