Fix #100115: Show non "Relative" animation keys in the shapekey action editor #121829

Merged
Sebastian Parborg merged 2 commits from ZedDB/blender:shapekey_action_evaltime into main 2024-05-21 14:05:48 +02:00

Because the shapekey editor is trying to have a more fancy UI with
sliders on each "Relative" shapekey value, all other animatible
properties were not drawn.

This patch now makes it possible to easily work with actions that have
non "Relative" keys. Before this was almost impossible as the user could
not see what action they had selected or which non relative keys were in
them as the UI would think that the action was empty.

While working on this I also noticed that there are some other
properties in relative mode that is not in the action editor either
(Range Min/Max). I added a TODO about that in the code as one would
probably want to group those together in a nice way with either
respective shapekey.

Because the shapekey editor is trying to have a more fancy UI with sliders on each "Relative" shapekey value, all other animatible properties were not drawn. This patch now makes it possible to easily work with actions that have non "Relative" keys. Before this was almost impossible as the user could not see what action they had selected or which non relative keys were in them as the UI would think that the action was empty. While working on this I also noticed that there are some other properties in relative mode that is not in the action editor either (Range Min/Max). I added a TODO about that in the code as one would probably want to group those together in a nice way with either respective shapekey.
Sebastian Parborg added the
Module
Animation & Rigging
label 2024-05-15 16:01:27 +02:00
Sebastian Parborg added 1 commit 2024-05-15 16:01:31 +02:00
Because the shapekey editor is trying to have a more fancy UI with
sliders on each "Relative" shapekey value, all other animatible
properties were not drawn.

This patch now makes it possible to easily work with actions that have
non "Relative" keys. Before this was almost impossible as the user could
not see what action they had selected or which non relative keys were in
them as the UI would think that the action was empty.

While working on this I also noticed that there are some other
properties in relative mode that is not in the action editor either
(Range Min/Max). I added a TODO about that in the code as one would
probably want to group those together in a nice way with either
respective shapekey.
Sebastian Parborg added this to the Animation & Rigging project 2024-05-15 16:01:38 +02:00
Sebastian Parborg requested review from Sybren A. Stüvel 2024-05-15 16:01:48 +02:00
Nathan Vegdahl requested review from Nathan Vegdahl 2024-05-21 10:23:09 +02:00
Nathan Vegdahl requested changes 2024-05-21 11:53:50 +02:00
Dismissed
Nathan Vegdahl left a comment
Member

Works great from a bit of testing. The code also basically looks good to me. Just one thing that can be simplified, and something that confused me a bit.

Works great from a bit of testing. The code also basically looks good to me. Just one thing that can be simplified, and something that confused me a bit.
@ -1700,0 +1714,4 @@
if (!key->adt || !key->adt->action) {
return 0;
}
animrig::Action &action = key->adt->action->wrap();
Member

This wrap is unnecessary (and I think ends up being a little misleading), since you're working with the action as a legacy action, rather than as a new-style layered action.

I'd say just work with the bAction pointer directly, which is both simpler and leaves the code in a state that more obviously needs to be updated for the new animation system when we get to it.

This wrap is unnecessary (and I think ends up being a little misleading), since you're working with the action as a legacy action, rather than as a new-style layered action. I'd say just work with the `bAction` pointer directly, which is both simpler and leaves the code in a state that more obviously needs to be updated for the new animation system when we get to it.
ZedDB marked this conversation as resolved
@ -1700,0 +1717,4 @@
animrig::Action &action = key->adt->action->wrap();
FCurve *first_fcu = static_cast<FCurve *>(action.curves.first);
for (FCurve *fcu = first_fcu;
(fcu = animfilter_fcurve_next(
Member

I might be confused, but shouldn't this be the incrementer, rather than the stop condition? And then the stop condition can just be the normal nullptr check.

I might be confused, but shouldn't this be the incrementer, rather than the stop condition? And then the stop condition can just be the normal nullptr check.
Member

Talked to @ZedDB in person, and he explained that this is the same looping code used elsewhere for the same general purpose. I think that's fine for now, and if we want to clean up how that works we can do it in the future as another commit/PR.

Talked to @ZedDB in person, and he explained that this is the same looping code used elsewhere for the same general purpose. I think that's fine for now, and if we want to clean up how that works we can do it in the future as another commit/PR.
nathanvegdahl marked this conversation as resolved
Sebastian Parborg added 1 commit 2024-05-21 13:06:26 +02:00
Nathan Vegdahl approved these changes 2024-05-21 14:00:51 +02:00
Sebastian Parborg merged commit 7ff8a7b173 into main 2024-05-21 14:05:48 +02:00
Sebastian Parborg deleted branch shapekey_action_evaltime 2024-05-21 14:05:51 +02: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
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
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
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 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#121829
No description provided.