Found the big error regarding those red undefined nodes...
this has been kinda plaguing my file for a long time I wondered what the issue is … I constantly get warnings.. About these nodes when I attempt to iterate over them with node recursion.. But in a nutshell there's red undefined nodes inside some of the group nodes of some daz materials I saved a blender file that's focused on the shader editor right at one of these nodes I was hoping you could add yet another material function that would go ahead and just find all these nodes and replace them with I guess it would be MIX color nodes now I would really appreciate………if not i’ll write something but this is something that's gonna plague users of Daz Studio assets that are older for a while if you don't write this….so I figure it's better it comes from you….. A major bug because if you try and use any sort of you know somewhat deep node recursion code it's gonna fill up your console with tons of lines of warnings and if it's something that you run all the time you know you're not gonna be able to use blender anymore until you get these out of there…..
Comments (9)
-
reporter -
repo owner - changed status to open
Maybe there already is some way to convert the old mix nodes to the new ones. This is a general Blender problem which affects anyone that opens an old blend file in a new Blender, so there should be a general Blender fix for it.
-
As I know it blender should automatically convert the old mix nodes. It’s the old blender that doesn’t get the new mix.
-
reporter I found it all you have to do is select an object and do import das materials and it reimports the material from your file the right way because I had imported this house using an old version of diffeomorphic that still allowed for the mixed legacy nodes but now with the latest development version you guys have figured all that out so all I have to do is reimport dazz materials I made an operator for my add-on that will run import dazz materials on all selected objects and I would definitely encourage you guys to do the same that's way better because if you have to do it 1 by 1 that's it would take forever on this house with like 200 pieces
-
reporter class FAST_OT_import_daz_materials(bpy.types.Operator, ImportHelper): """Import DAZ materials from a DUF file to all selected objects""" bl_idname = "fast.import_daz_materials" bl_label = "Import DAZ Materials" bl_options = {'REGISTER', 'UNDO'} # ImportHelper mixin class uses this filename_ext = ".duf" filter_glob: StringProperty( default="*.duf", options={'HIDDEN'}, maxlen=255, # Max internal buffer length, longer would be clamped. ) def execute(self, context): try: import import_daz except ModuleNotFoundError: self.report({'WARNING'}, "The import_daz module is not found. The Diffeomorphic add-on might not be enabled.") return {'CANCELLED'} import_daz.set_silent_mode(True) import_daz.set_selection([self.filepath]) targets = context.selected_objects # deselect all objects bpy.ops.object.select_all(action='DESELECT') for target in targets: if target.type == 'MESH': bpy.ops.object.select_all(action='DESELECT') target.select_set(True) # select the target context.view_layer.objects.active = target # make the target active bpy.ops.daz.import_daz_materials( skinColor = (0.600,0.400,0.250,1.000), clothesColor = (0.090,0.010,0.015,1.000), materialMethod = 'BSDF', useReplaceSlots = True, useAddSlots = True, useMatchNames = True ) target.select_set(False) # deselect the target after operation return {'FINISHED'}
-
reporter ran into a weird issue it's not really working as expected my operator I was hoping maybe you could look at it because I'm doing the exact actions that I do in blender essentially but yeah this isn't working
-
reporter Never mind don't need to answer this one either I found out you get rid of the selection each time you run the function it would be cool if it kept the selection but I just put set selection in my for loop and it worked
-
- changed status to invalid
user error
-
reporter Thank you so much i'll make sure to turn error to false or true whatever it is to turn it on thank you
- Log in to comment
I don't know if it'll help but remember I gave you all that node recursion code that one awesome programmer wrote I don't know if you need it but I'll send it again if you want to..