Page MenuHome

Missing API documentation for CollectionProperty
Needs Triage, NormalPublic


System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 441.41

Blender Version
Broken: version: 2.82 (sub 7), branch: master, commit date: 2020-02-12 16:20, hash: rB77d23b0bd76f
Worked: n.a.

Short description of error
I first checked on the python channels in and devtalk. Eventually @Aaron Carlisle (Blendify) suggested to file a bug report.

I'm building some pipeline scripts script and in trying to understand the CollectionProperty I found it was missing documentation for much functionality.
The Property Definitions docs show an example for working with CollectionProperties:
It shows how to use .add() and how the object can be iterated through. But these methods are not mentioned/expanded upon in the type documentation:

Looking at scripts that use CollectionProperties, they mostly implement the same API as Python lists? I saw it also supports .append etc.
But doing a global search through the python codebase I also see that .move(current_idx, target_idx) is used.
I’ve looked through its declaration in bpy_props.c and eventually found these functions rna_access.c, with RNA_property_collection_move etc..

I do suppose this is supposed to show up in the documentation of the type? I don't think I am overlooking something?
I couldn’t figure out how I could patch/improve this by myself, so I wanted to report this here. Should the examples be expaned in the bpy.props documentation page, or is there any way to expand the documentation of the actual type so it shows up on its page.