Mention EnumProperty() columns in docs? #89114

Open
opened 2021-06-13 18:08:21 +02:00 by Will · 4 comments

Blender Version
Broken: Master
Worked: Never

Short description of error

bpy.props.EnumProperty() can have its items drawn under columns by adding items that have empty strings for both their identifier and description. This does not seem to be mentioned in the documentation.

I was going to submit a patch instead of a report. But having never worked directly with either C or DOxygen(?), I expect that after I'm done downloading ~600MB just to change two non-functional lines of documentation, all I will accomplish is to make something that fails to compile and take up more of the developers' time as well. I can still resume the download and try to figure it out if it would really be preferable, but I hope this is fine for such a simple change.

I suggest making something like the below changes to python/intern/bpy_props.c:

3396c3396,3398
<     "      Separators may be added using None instead of a tuple."
---
>     "      Separators may be added using None instead of a tuple.\n"
>     "\n"
>     "      Items may be sorted into columns by using tuples that have empty strings for `identifier` and `description`.\n"

Exact steps for others to reproduce the error

bpy.types.Scene.TestProp = bpy.props.EnumProperty(
    items = (
        ("", "ColumnA", ""),
        ("ColA1", "ColA1", "Desc."),
        ("ColA2", "ColA2", "Desc."),
        ("ColA3", "ColA3", "Desc."),
        ("", "ColumnB", ""),
        ("ColB1", "ColB1", "Desc."),
        ("ColB2", "ColB2", "Desc.")
    )
)

Not in the docs.

From the StackExchange.

**Blender Version** Broken: Master Worked: Never **Short description of error** `bpy.props.EnumProperty()` can have its items drawn under columns by adding items that have empty strings for both their `identifier` and `description`. This does not seem to be mentioned in the documentation. I was going to submit a patch instead of a report. But having never worked directly with either C or DOxygen(?), I expect that after I'm done downloading ~600MB just to change two non-functional lines of documentation, all I will accomplish is to make something that fails to compile and take up more of the developers' time as well. I can still resume the download and try to figure it out if it would really be preferable, but I hope this is fine for such a simple change. I suggest making something like the below changes to `python/intern/bpy_props.c`: ``` 3396c3396,3398 < " Separators may be added using None instead of a tuple." --- > " Separators may be added using None instead of a tuple.\n" > "\n" > " Items may be sorted into columns by using tuples that have empty strings for `identifier` and `description`.\n" ``` **Exact steps for others to reproduce the error** ``` bpy.types.Scene.TestProp = bpy.props.EnumProperty( items = ( ("", "ColumnA", ""), ("ColA1", "ColA1", "Desc."), ("ColA2", "ColA2", "Desc."), ("ColA3", "ColA3", "Desc."), ("", "ColumnB", ""), ("ColB1", "ColB1", "Desc."), ("ColB2", "ColB2", "Desc.") ) ) ``` Not in [the docs](https://docs.blender.org/api/master/bpy.props.html#bpy.props.EnumProperty). [From the StackExchange.](https://blender.stackexchange.com/a/227509/79413)
Author

Added subscriber: @WCN

Added subscriber: @WCN

Added subscriber: @iss

Added subscriber: @iss

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

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

This sounds reasonable.

Building Blender is quite easy actually if you follow https://wiki.blender.org/wiki/Building_Blender
Building docs is bit more hidden, I think you just run doc/python_api/sphinx_doc_gen.py and follow instructions.

This sounds reasonable. Building Blender is quite easy actually if you follow https://wiki.blender.org/wiki/Building_Blender Building docs is bit more hidden, I think you just run `doc/python_api/sphinx_doc_gen.py` and follow instructions.
Philipp Oeser removed the
Interest
Python API
label 2023-02-10 09:04:31 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 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#89114
No description provided.