GPv3: Display layer groups in grease pencil dopesheet #111015

Merged
Amélie Fondevilla merged 34 commits from amelief/blender:gpv3-dopesheet-layer-groups into main 2023-08-21 10:51:06 +02:00

This patch adds a new type of channel for grease pencil layer groups, which works as an expandable summary channel of layers inside the group.

Here is a before/after image of the dopesheet :

dopesheet_layer_groups_bf_af.png

This patch adds a new type of channel for grease pencil layer groups, which works as an expandable summary channel of layers inside the group. Here is a before/after image of the dopesheet : ![dopesheet_layer_groups_bf_af.png](/attachments/e7f99574-c629-4d91-9cbe-e0247b384fcb)
Amélie Fondevilla added this to the Grease Pencil project 2023-08-10 17:47:38 +02:00
Amélie Fondevilla requested review from Falk David 2023-08-10 18:08:11 +02:00
Falk David requested changes 2023-08-14 11:12:32 +02:00
Falk David left a comment
Member

This already looks quite close. Just a few comments. And let me know if the comment about the namespace causes too much trouble.

This already looks quite close. Just a few comments. And let me know if the comment about the `namespace` causes too much trouble.
@ -182,0 +183,4 @@
/**
* \returns the number of non-null parents of the node.
*/
int depth() const;
Member

int64_t

`int64_t`
amelief marked this conversation as resolved
@ -487,6 +487,15 @@ LayerGroup *TreeNode::parent_group() const
return nullptr;
}
int TreeNode::depth() const
Member

int64_t

`int64_t`
amelief marked this conversation as resolved
@ -490,0 +491,4 @@
{
const LayerGroup *parent = this->parent_group();
if (parent == nullptr) {
return 0;
Member

Add a comment /* The root group has a depth of 0. */

Add a comment `/* The root group has a depth of 0. */`
amelief marked this conversation as resolved
@ -3560,0 +3561,4 @@
static short acf_gpl_offset(bAnimContext *ac, bAnimListElem *ale)
{
GreasePencilLayerTreeNode *node = static_cast<GreasePencilLayerTreeNode *>(ale->data);
const int depth = node->wrap().depth();
Member

Don't think this needs a variable here. Just calling node->wrap().depth() below reads well :)

Don't think this needs a variable here. Just calling `node->wrap().depth()` below reads well :)
amelief marked this conversation as resolved
@ -3630,6 +3666,73 @@ static bAnimChannelType ACF_GPL = {
/*setting_ptr*/ acf_gpl_setting_ptr,
};
/* Grease Pencil Layer Group -------------------------------- */
Member

Would be nice to put these static functions in a namespace. E.g. ed::animation::greasepencil. And then the functions could be layer_group_icon, layer_group_color etc. The bAnimChannelType would still be in the global namespace of course.

Would be nice to put these static functions in a namespace. E.g. `ed::animation::greasepencil`. And then the functions could be `layer_group_icon`, `layer_group_color` etc. The `bAnimChannelType` would still be in the global namespace of course.
amelief marked this conversation as resolved
Amélie Fondevilla force-pushed gpv3-dopesheet-layer-groups from 1e804becbc to 13989f71d5 2023-08-16 10:07:36 +02:00 Compare
Amélie Fondevilla requested review from Sybren A. Stüvel 2023-08-16 11:42:41 +02:00
Amélie Fondevilla force-pushed gpv3-dopesheet-layer-groups from 6865b3cc16 to 71cc6483a2 2023-08-16 12:01:08 +02:00 Compare
Falk David approved these changes 2023-08-16 12:01:58 +02:00
Falk David left a comment
Member

LGTM :)

LGTM :)
Author
Member

@dr.sybren could you take a look more specifically at the way we now define the grease pencil channel types in anim_channels_defines.cc using an blender::ed::animation namespace ?
Of course, you are very welcome to comment on other parts of the code as well.

@dr.sybren could you take a look more specifically at the way we now define the grease pencil channel types in `anim_channels_defines.cc` using an `blender::ed::animation` namespace ? Of course, you are very welcome to comment on other parts of the code as well.
Amélie Fondevilla force-pushed gpv3-dopesheet-layer-groups from 184a0a0aeb to c920335471 2023-08-21 10:50:14 +02:00 Compare
Amélie Fondevilla merged commit 3dc93d6e38 into main 2023-08-21 10:51:06 +02:00
Amélie Fondevilla deleted branch gpv3-dopesheet-layer-groups 2023-08-21 10:51:08 +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
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#111015
No description provided.