I have a collection property defined as:
bpy.types.Scene.my_list = CollectionProperty(type=MyListClass)
and I know that I can add a function to every item in that list by defining it inside MyListClass
, but instead, I want to define a function that can be accessed from the base of the property (sorry if that’s incorrect, I’m not sure what the correct terminology is).
AKA, I want to be able to access my function from:
bpy.context.scene.my_list.my_function()
rather than:
bpy.context.my_list["my_item"].my_function()
Is this possible? The same question also applies to custom properties.