Hi! For some reason layout.prop() drawing seems kind of weird to me. My goal is to create a custom bool property, so I figured out how to define the custom bool itself:
my_bool = bpy.props.BoolProperty(name=“BoolName”, default=False)
…But we get to the drawing part which I don’t understand.
So layout.prop() takes 2 arguments(as I understand): context (or something) and property variable (“my_bool”)
And for that to work I’m obligated to type in some thing like: context.scene or context.object in the first argument.
Now the property works, but I really want to know what I’m doing and I don’t understand why does it need to belong to some context. Why can’t it be drawn like an operator for which you only need to pass the id and maybe some text
Because right now I’m just writing context.scene just to make it work, but I don’t understand what it adds to it or what would happen if changed it to context.object. It just doesn’t make sense to my why that’s required.
So help me understand people