Fix #117970: Fix RNA checks for animatable properties, add a check for drivable ones. #118809

Merged
Bastien Montagne merged 1 commits from mont29/blender:tmp-117970 into blender-v4.1-release 2024-03-01 18:19:48 +01:00

The RNA_property_animateable would check for some conditions, where it
is not valid to add or edit animations (e.g. if using a linked Action
ID...).

Add a new RNA_property_drivable, which is essentially a call to
RNA_property_animateable with extra checks in liboverride cases, as
drivers are stored directly in the AnimData struct, instead of their own
dedicated ID.

The `RNA_property_animateable` would check for some conditions, where it is not valid to add or edit animations (e.g. if using a linked Action ID...). Add a new `RNA_property_drivable`, which is essentially a call to `RNA_property_animateable` with extra checks in liboverride cases, as drivers are stored directly in the AnimData struct, instead of their own dedicated ID.
Bastien Montagne added 1 commit 2024-02-27 16:37:02 +01:00
The `RNA_property_animateable` would check for some conditions, where it
is not valid to add or edit animations (e.g. if using a linked Action
ID...).

Add a new `RNA_property_drivable`, which is essentially a call to
`RNA_property_animateable` with extra checks in liboverride cases, as
drivers are stored directly in the AnimData struct, instead of their own
dedicated ID.
Bastien Montagne requested review from Nathan Vegdahl 2024-02-27 16:37:29 +01:00
Bastien Montagne requested review from Sybren A. Stüvel 2024-02-27 16:37:29 +01:00
Bastien Montagne added the
Module
Animation & Rigging
label 2024-02-27 16:37:45 +01:00
Bastien Montagne reviewed 2024-02-27 16:38:36 +01:00
@ -2198,3 +2209,3 @@
}
return (prop->flag & PROP_EDITABLE) != 0;
return RNA_property_editable(const_cast<PointerRNA *>(ptr), prop);
Author
Owner

I'm especially unsure about this change - but I do not see how only checking for the static flag here is correct?

I'm especially unsure about this change - but I do not see how only checking for the static flag here is correct?

I agree, I think the old code simply was that: old. And crusty.

I agree, I think the old code simply was that: old. And crusty.
Sybren A. Stüvel approved these changes 2024-03-01 15:30:32 +01:00
Sybren A. Stüvel left a comment
Member

Thanks, this looks nice!

Thanks, this looks nice!
Bastien Montagne merged commit 427eed292d into blender-v4.1-release 2024-03-01 18:19:48 +01:00
Bastien Montagne deleted branch tmp-117970 2024-03-01 18:19:55 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
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
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#118809
No description provided.