what I am trying to do is registering my own image user (for node customization). Basically, I am trying to create a custom node group that can be an image user. Placing 'ShaderNodeTexImage' node into its node tree is not an option - the class itself must be able to hold the image and the image_user attributes. So, I attempted:
class experimental(bpy.types.ShaderNodeTexImage): bl_label = "this is experimental" bpy.utils.register_class(experimental) bpy.context.active_object.active_material.node_tree.nodes.new(type = 'experimental')
This does create a new node and register the class with no mistakes but I try
it does not show the Image property (my subclass does not inherit the properties of the ShaderNodeTexImage). Why???
is there any other way to create an .image and .image_user properties for my custom class? in the ideal world, I would like to have something like:
class myClass(bpy.types.Node): img = bpy.types.Image(params) img_user = bpy.types.ImageUser(params)
Is there any way to achieve this?