Missing API documentation for CollectionProperty #75129

Open
opened 2020-03-27 13:53:15 +01:00 by Steff Kempink · 6 comments

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: blender/blender@77d23b0bd7
Worked: n.a.

Short description of error
I first checked on the python channels in blender.chat and devtalk. Eventually @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:
https://docs.blender.org/api/current/bpy.props.html#collection-example
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:
https://docs.blender.org/api/current/bpy.types.CollectionProperty.html#bpy.types.CollectionProperty

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..

So:
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.

**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: `blender/blender@77d23b0bd7` Worked: n.a. **Short description of error** I first checked on the python channels in blender.chat and devtalk. Eventually @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: https://docs.blender.org/api/current/bpy.props.html#collection-example 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: https://docs.blender.org/api/current/bpy.types.CollectionProperty.html#bpy.types.CollectionProperty 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.. So: 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.
Author

Added subscribers: @Blendify, @McSwiff

Added subscribers: @Blendify, @McSwiff
Member

Added subscriber: @dr.sybren

Added subscriber: @dr.sybren
Member

@dr.sybren can you look into this?

@dr.sybren can you look into this?

I don't have the time to write docs for this. Maybe some day ;-)

I don't have the time to write docs for this. Maybe some day ;-)
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

Removed subscriber: @dr.sybren

Removed subscriber: @dr.sybren
Aaron Carlisle removed the
Module
Python API
label 2023-02-08 05:03:24 +01:00
Aaron Carlisle added the
Module
Python API
label 2023-08-13 15:30:49 +02:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-manual#75129
No description provided.