I'm trying to write some code to clean up duplicate materials after some imports but having a bit of trouble with comparing them.
I have used chatGPT to try and progress but I fear as the latest version it knows about for blender is 2.8 it might not have the latest method to do it.
I have two materials that are exactly the same in terms of textures and shader properties "default" & "default.001", I'm trying to compare them using the following piece of code
if material.node_tree == other_material.node_tree:
Unfortunately the code does not say they are the equal, am I doing the code wrong? or is it simply that the name of the material is included in the node_tree and that means they are not equal? (As in default & default.001)
I'd appreciate any help anyone could give me on this, I'm still rather new at blender python and find the documentation rather confusing!