how does it works what does it represent ?
class Material:
def makeNode(self, type, name):
self.node = self.nodes.new(type)
self.node.name = name
self.xpos += 200
self.node.location = self.xpos, self.ypos
return self.node
first you have to instantiate the class material
then you call the function inside like
diffuseBSDF = m1.makeNode(‘ShaderNodeBsdfDiffuse’, ‘diff1’)
what does the self represent is it a name cause if i print it i get
self= <main.Material object at 0x1227C170>
but looks more like an addres!
i tought self for a class was the class 's name!
thanks