GPv3: Select box grease pencil frames #110939

Merged
Amélie Fondevilla merged 4 commits from Chao-Li/blender:110522 into main 2023-08-16 11:44:23 +02:00
Contributor

Adapt the ACTION_OT_select_leftright, ACTION_OT_select_box and ACTION_OT_select_column operators to take into account grease pencil layer channels. These operators call actkeys_select_leftright, box_select_elem, and markers_selectkeys_between, respectively. In these three functions, grease pencil layer channels are considered now. This resolves #110522.

Adapt the `ACTION_OT_select_leftright`, `ACTION_OT_select_box` and `ACTION_OT_select_column` operators to take into account grease pencil layer channels. These operators call `actkeys_select_leftright`, `box_select_elem`, and `markers_selectkeys_between`, respectively. In these three functions, grease pencil layer channels are considered now. This resolves #110522.
Chao Li force-pushed 110522 from d835cdb855 to 182484666b 2023-08-09 03:07:28 +02:00 Compare
Iliya Katushenock added the
Interest
Grease Pencil
label 2023-08-09 16:47:56 +02:00
Amélie Fondevilla added this to the Grease Pencil project 2023-08-11 09:35:06 +02:00
Amélie Fondevilla requested review from Amélie Fondevilla 2023-08-11 09:43:13 +02:00

Hi @Chao-Li ,
Sorry, I only noticed this PR today. Thanks for the patch, the code looks good to me !

We recently added grease pencil object summaries in the dopesheet (d5b2960a07), so we need to also account for them in the operators.

I will leave a comment in the code to point were things should be added.
You may also want to rebase the branch to get the current state of the main branch to be able to test and select those summary keyframes.

Hi @Chao-Li , Sorry, I only noticed this PR today. Thanks for the patch, the code looks good to me ! We recently added grease pencil object summaries in the dopesheet (https://projects.blender.org/blender/blender/commit/d5b2960a07c9073d675912ef64252e0da4ebf48e), so we need to also account for them in the operators. I will leave a comment in the code to point were things should be added. You may also want to rebase the branch to get the current state of the main branch to be able to test and select those summary keyframes.
Amélie Fondevilla requested changes 2023-08-11 09:57:52 +02:00
@ -431,0 +433,4 @@
static_cast<GreasePencilLayer *>(ale->data)->wrap(), xmin, xmax, sel_data->selectmode);
ale->update |= ANIM_UPDATE_DEPS;
break;
}

Here, we need to add a case for ANIMTYPE_GREASE_PENCIL_DATABLOCK, in which we loop over all the layers of the grease pencil object, and call select_frame_box on the layer.
Note: if ale->type == ANIMTYPE_GREASE_PENCIL_DATABLOCK, then ale->data can be casted to a GreasePencil structure.

Here, we need to add a case for `ANIMTYPE_GREASE_PENCIL_DATABLOCK`, in which we loop over all the layers of the grease pencil object, and call `select_frame_box` on the layer. Note: if `ale->type == ANIMTYPE_GREASE_PENCIL_DATABLOCK`, then `ale->data` can be casted to a `GreasePencil` structure.
Chao-Li marked this conversation as resolved
Falk David requested changes 2023-08-14 13:02:33 +02:00
Falk David left a comment
Member

One comment from me :)

One comment from me :)
@ -108,6 +109,19 @@ void select_frames_region(KeyframeEditData *ked,
}
}
void select_frames_box(bke::greasepencil::Layer &layer,
Member

I'd name this select_frames_range, since we're not selecting in a rectangle/box here.

I'd name this `select_frames_range`, since we're not selecting in a rectangle/box here.
Chao-Li marked this conversation as resolved
Chao Li added 2 commits 2023-08-16 03:13:40 +02:00
Chao Li added 1 commit 2023-08-16 04:11:14 +02:00
Falk David approved these changes 2023-08-16 11:34:24 +02:00
Falk David left a comment
Member

Looks good to me :)

Looks good to me :)
Amélie Fondevilla approved these changes 2023-08-16 11:43:29 +02:00
Amélie Fondevilla merged commit 27eb6d48d3 into main 2023-08-16 11:44:23 +02:00
Sign in to join this conversation.
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
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#110939
No description provided.