I cannot find any documentation for the existing CollectionProperty
methods.
Regardings properties, generally i find .../bpy.props.html helpful, but it doesn't have any method declarations. Usually with other properties this isn't necessary, as they just give me a value of a regular python type that I know - like StringProperty which yields a string.
With a CollectionProperty this is different: it gives me some sort of collection, I can iterate over it, but it is not a simple python structure.
There is the official doc of .../bpy.types.CollectionProperty.html, but it lacks documentation for the add
and remove
methods (it never mentions them).
Related Question: Remove from CollectionProperty
Apparently there is also a move
method:
CollectionProperty - change item's index
Are there anydocs out there?
P.S. digging through the blender source (of some cloned repo, because I like browsign github) I found this: https://github.com/dfelinto/blender/blob/master/source/blender/python/intern/bpy_props.c#L3029
However I cannot find any hints in there with respect to the existing methods.
collection.clear()
may not have been available at the time of writing that answer. IMO a question like "How to copy a collection item?", or something with CRUD in the title... would be a far more productive route than bemoaning "The docs aren't perfect" $\endgroup$