WIP: Animation: Select Grouped operator
#104758
Draft
RedMser
wants to merge 9 commits from RedMser/blender:animation-select-grouped
into main
pull from: RedMser/blender:animation-select-grouped
merge into: blender:main
blender:main
blender:blender-v3.6-release
blender:temp-sculpt-dyntopo
blender:temp-sculpt-dyntopo-hive-alloc
blender:asset-shelf
blender:cycles-light-linking
blender:tmp-usd-python-mtl
blender:brush-assets-project
blender:blender-v2.93-release
blender:blender-v3.3-release
blender:universal-scene-description
blender:node-group-operators
blender:asset-browser-frontend-split
blender:temp-sculpt-attr-api
blender:blender-v3.5-release
blender:realtime-clock
blender:sculpt-dev
blender:gpencil-next
blender:bevelv2
blender:microfacet_hair
blender:blender-projects-basics
blender:principled-v2
When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Reviewers
Request review
No reviewers
Labels
Clear labels
Issues relating to security: https://wiki.blender.org/wiki/Process/Vulnerability_Reports
Apply labels
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
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
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
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
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
Issues relating to security: https://wiki.blender.org/wiki/Process/Vulnerability_Reports
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 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
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
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
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
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
Milestone
Set milestone
Clear milestone
No items
No Milestone
Projects
Set Project
Clear projects
No project
Assignees
Assign users
Clear assignees
No Assignees
3 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#104758
Reference in New Issue
There is no content yet.
Delete Branch "RedMser/blender:animation-select-grouped"
Deleting a branch is permanent. It CANNOT be undone. Continue?
Revival of D14811
Closes #86180 for the Dopesheet, Graph and NLA editors
Supports filtering in multiple datablocks, and takes the properties from all selected keyframes/strips into account (similar to how this operator works in the 3D view).
Each operation can also be filtered to only apply to the currently selected channels, as opposed to all visible channels.
The code is a bit sub-optimal, due to how KeyframeEditData works, but from my testing it seems to work fine.
Currently doesn't handle the Dopesheet modes Grease Pencil, Mask and Cache File (simply de-selects all keyframes).
For animators interested in trying this out, here are short descriptions of all the available operations:
Dopesheet
Graph Editor
All of Dopesheet's operations, but also:
NLA
Slightly outdated videos of the operator below:
Thanks! I've put this on the agenda for today's module meeting.
What is sub-optimal, exactly? Is there something you need help with? Is it a software design issue, or more an implementation issue?
@dr.sybren I'll see if I get the time to join today. There's some ideas and design questions I'd like to discuss.
I'm not a C developer, so the entire way the code is structured feels a bit hacked together to me.
There's large amounts of code duplication between the Dopesheet and Graph Editor operator. I don't know where to put this kind of shared code.
Since most other animation operators are also just copy-pasted between these files (with TODO comments hinting at that), I can't find any existing operator to take as reference there.
If you believe it is fine to keep it like this initially, and possibly refactor it later, then I won't object.
@blender-bot package
Package build started. Download here when ready.
👍
Ok, I'll keep that in mind when reviewing. Maybe me, @ChrisLend or @nrupsis can help with this.
Needs to handle Channel Type better (currently breaks for deeper RNA paths, like bones).
Also have some open design questions in #86180 that need attention first.
(I dont have permissions to request changes on my own PR?? 🤯)
You can't, who would you request it to?
You can mark the PR as "work in progress" though. The "Still in progress? Add WIP: prefix" link in the sidebar is a convenient way to do that.
I mean this:
I believe WIP is meant for "not ready for review", whereas request changes is for "unapproved / not ready to merge".
But it doesn't matter much anyway ^^
That's exactly my point. When you're planning changes to a PR, and thus it shouldn't be reviewed, marking as WIP is exactly the thing that accomplishes that. It will set the status to "Draft" and it won't (or at least shouldn't) appear on anyone's review queue.
eff3619d5d
toead2243a63
Animation: Select Grouped operatorto WIP: Animation: Select Grouped operatorI only just looked at the code -- you weren't kidding ;-)
It seems you took inspiration from code in a style we actually want to get rid of.
New operators should IMO be implemented in C++, and this one would likely benefit from that. There certainly is too much duplication going on.
A few general remarks that can help move things forward:
short
when you actually can use abool
. Usetrue
andfalse
and not1
or0
.case
blocks do not need{}
; those are only necessary if you declare new variables inside the block.These are relatively minor things though. I think the biggest issue with the code, and that's not something you can do anything about, is that it builds up on a system that we want to get rid of: the animation data filtering system.
Maybe it's better to put this patch on hold for now, until we have a good replacement for that.
Thanks for the tips @dr.sybren - I probably followed really old code to end up with what I have now haha.
I wouldn't mind this tbh, since there's some kinks to work out regarding the design, and since the feature doesn't seem to be in urgent demand or anything. I'll keep this PR around and can update it in the future.