Hi dear forum, I’m using Collections to store my custom propreties of my addons.
My concern is, it’s creating an Collection array with
class customPropertyGroup(bpy.types.PropertyGroup):
Order = StringProperty()
bpy.types.Scene.customCollection = bpy.props.CollectionProperty(type = customPropertyGroup)
How can I make it the way I don’t have to get my collection with
You need to register on bpy.types.Scene, but access via a scene instance, e.g. bpy.context.scene (with lower-case s!).
bpy.context.scene.customCollections will give you access to the collection, [0] should return the first entry in the collection.
I wonder if your concept is good, you can use a PointerProperty with a derived PropertyGroup class to organize several properties.Co
llections should really be used for a varying number of properties.