Fix #106395: Custom properties dont appear in quick favorites #108713

Merged
Philipp Oeser merged 2 commits from lichtwerk/blender:106395 into blender-v3.6-release 2023-06-08 10:37:42 +02:00
Member

Issue here was that Quick Favorites use a property's identifier when
adding [which is the bare name without brackets etc. from id properties]
but when spawning the actual menu, RNA_struct_find_property expects
the identifier to already include the brackets to know these are id
properties (later on in screen_user_menu_draw).

So to solve this, now include the needed syntax when storing the
bUserMenuItem_Prop identfier.
Seems the quickest way to append the needed characters is using
RNA_path_property_py (not sure if there a re better ways to do this).
Also note that we (need to) ignore the actual array index constructing
the string [alays pass -1 here] since the index is handled separately [I
tested boolean arrays and these work].

Issue here was that Quick Favorites use a property's **identifier** when adding [which is the bare name without brackets etc. from id properties] but when spawning the actual menu, `RNA_struct_find_property` expects the identifier to already include the brackets to know these are id properties (later on in `screen_user_menu_draw`). So to solve this, now include the needed syntax when storing the `bUserMenuItem_Prop` identfier. Seems the quickest way to append the needed characters is using `RNA_path_property_py` (not sure if there a re better ways to do this). Also note that we (need to) ignore the actual array index constructing the string [alays pass -1 here] since the index is handled separately [I tested boolean arrays and these work].
Philipp Oeser added 1 commit 2023-06-07 17:04:28 +02:00
fdde52a802 Fix #106395: Custom properties dont appear in quick favourites
Issue here was that Quick Favorites use a property's **identifier** when
adding [which is the bare name without brackets etc. from id properties]
but when spawning the actual menu,  `RNA_struct_find_property` expects
the identifier to already include the brackets to know these are id
properties (later on in `screen_user_menu_draw`).

So to solve this, now include the needed syntax when storing the
`bUserMenuItem_Prop` identfier.
Seems the quickest way to append the needed characters is using
`RNA_path_property_py` (not sure if there a re better ways to do this).
Also note that we (need to) ignore the actual array index constructing
the string [alays pass -1 here] since the index is handled separately [I
tested boolean arrays and these work].
Philipp Oeser requested review from Campbell Barton 2023-06-07 17:04:37 +02:00
Philipp Oeser added this to the User Interface project 2023-06-07 17:04:43 +02:00
Campbell Barton approved these changes 2023-06-08 03:19:26 +02:00
Campbell Barton reviewed 2023-06-08 03:20:52 +02:00
Campbell Barton reviewed 2023-06-08 03:20:52 +02:00
@ -344,2 +345,3 @@
char *member_id_data_path = WM_context_path_resolve_full(C, &but->rnapoin);
const char *prop_id = RNA_property_identifier(but->rnaprop);
const char *prop_id = RNA_property_is_idprop(but->rnaprop) ?
RNA_path_property_py(&but->rnapoin, but->rnaprop, -1) :

Please include a comment that the array index is handled separately, otherwise this reads as if arrays indices are aren't supported.

Please include a comment that the array index is handled separately, otherwise this reads as if arrays indices are aren't supported.
Campbell Barton changed title from Fix #106395: Custom properties dont appear in quick favourites to Fix #106395: Custom properties dont appear in quick favorites 2023-06-08 03:21:52 +02:00
Philipp Oeser added 1 commit 2023-06-08 10:34:13 +02:00
Philipp Oeser merged commit 9e598aa0ef into blender-v3.6-release 2023-06-08 10:37:42 +02:00
Philipp Oeser deleted branch 106395 2023-06-08 10:37:45 +02:00
Sign in to join this conversation.
No reviewers
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#108713
No description provided.