Fix: Editor related RNA paths incomplete/wrong #125365
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#125365
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "lichtwerk/blender:124527"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The RNA path that is generated for Editor properties were mostly
incomplete (e.g. the viewport overlay settings).
Copy (Full) Data Path
operatorpath_from_id
,path_resolve
returned incomplete pathsSince a space (editor) is ultimately owned by the screen, we now add the
missing "areas[x].spaces[x]" subpath to any editor.
Nested structs (like the viewport overlay) also need to include this
subpath.
Some editor related structs are not tied to a single space though (and
these cases are therefor not resolved yet):
well
need more investigation
NOTE: in case of the VSE, to make this work this also changes the
overlays to be tied to SpaceSeq (the only editor using them)
NOTE: since the above is now in place, adding VSE overlay props to Quick
favourites is now made possible as well (was a leftover from !116604)
Fixes #124527, #113489
Fix: Editor related RNA paths incompleteto Fix: Editor related RNA paths incomplete/wrong@blender-bot build
Would like to hear from @mont29 first since he's working on a new design for RNA paths, so there's a chance this could end up being redundant work.
LGTM from general approach and quick code check perspectives.
Indeed the on-going work on #122431 should make such code deprecated pretty soon - but 'pretty soon' is an unclear measurement here. Adding 'self path knowledge' to
PointerRNA
requires large and fairly complex refactors, which will take time. So I think this relatively simple patch is fine to address the issue for the time being.@blender-bot build
Looks mostly good to me then, small changes requested.
@ -870,1 +872,4 @@
std::optional<std::string> BKE_screen_path_from_screen_to_space(const PointerRNA *ptr)
{
bScreen *screen = (bScreen *)ptr->owner_id;
Let's not do completely unprotected casting of the owner. Would suggest returning an empty value when
owner_id
is not of typeID_SCR
, and add aBLI_assert_unreachable()
to find potential errors.Also, don't use C-style casts, they are unsafe and hide issues.
reinterpret_cast
should work here.@ -871,0 +873,4 @@
std::optional<std::string> BKE_screen_path_from_screen_to_space(const PointerRNA *ptr)
{
bScreen *screen = (bScreen *)ptr->owner_id;
SpaceLink *link = (SpaceLink *)ptr->data;
static_cast
@ideasman42 : still want to review this?
@lichtwerk just go and commit!
@blender-bot build