I'm working on a addon that makes use of custom node groups that has a Pointer property that holds a specific custom class type. like that:

class BM_ShaderNode_mask_texture(bpy.types.ShaderNodeCustomGroup):
    ... [some other code]
    mask_texture: bpy.props.PointerProperty(name="mask texture", type=MaskTexture, update=update_node_tree)
    ... [the rest of the code]

This is the class type it's refers to: class MaskTexture (bpy.types.PropertyGroup):

I want to set this Proeprty from somewhere else, which should be simple, apparently, but when I try to do it, I get the following error: AttributeError: bpy_struct: attribute "mask_texture" from "BM_ShaderNode_mask_texture" is read-only

It's weird, I haven't come across this anywhere else, I tried changing the Property type to Object, and it worked great, for some reason it only happens in this specific situation.

I would appreciate it if someone could help me.



You must log in to answer this question.