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
bpy.context.active_object.active_material.node_tree.nodes.active.[autocomplete]
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?
img = bpy.types.Image(params)(do you think you can even instance an image that way in blender?) more likely would useimg = bpy.props.PointerProperty(type=bpy.types.Image)Have no idea what the 2 sentences blah re my comment (yes a comment not an answer) is about.... don't think I want to know. – batFINGER Mar 14 '19 at 14:20