GPv3: Layergroup color tag #122873
No reviewers
Labels
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#122873
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "PratikPB2123/blender:gpv3-layergroup-colortag"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Reused the collection color theme option for the layer group.
Introduced new operator change the icon color it can be accessed from
layer group context menu.
Part of #121390
Is that just changing color? I see layers don't have custom channel color property itself.
I strongly advise using these collection colors in Dope Sheet instead of them. Managing channel colors per-layer is absolute pain. (or at least add ability to override with collection color)
@nickberckley hi, not sure what you're expecting here 🙂
As discussed with Falk in #121390 , idea was to change group icon color just like "collection icon in outliner"
why? 🤔
When you have multiple layers and want to change color for all of them its a hustle. Collection-centric workflow like rest of Blender would be much more convimient
@nickberckley Layers don't have color tags. This is just for layer groups.
Yes what I'm proposing is using this color tags for dope sheet channel colors as well
I see, yea that would make sense. I don't think this PR needs to change all of that though. For now, just introducing a way to set a color for a layer group is fine. There are more ideas on where to use those colors, but we'll have to discuss this with the module.
Did a quick pass on the code. Still need to test this locally.
@ -612,6 +612,7 @@ class LayerGroup : public ::GreasePencilLayerTreeGroup {
LayerGroup &operator=(const LayerGroup &other);
public:
int color_icon;
These classes can't store data, they can only contain functions.
You need to add this to DNA:
(I should add some static asserts to the wrapper classes of the DNA structs to ensure this doesn't compile)
Done.
e65981b999
Thanks, will update.
Actually, I added new member to struct but wasn't compiling after that. Didn't know
_pad
is required there 😅@ -259,6 +260,7 @@ static int grease_pencil_layer_group_add_exec(bContext *C, wmOperator *op)
}();
LayerGroup &new_group = grease_pencil.add_layer_group(parent_group, new_layer_group_name);
new_group.color_tag = -1;
This can be moved into
LayerGroup::LayerGroup()
I think since it should be the starting value always. Also useLAYERGROUP_COLOR_NONE
.@ -386,1 +386,3 @@
uiBut *but = uiItemL_ex(&row, group_.name().c_str(), ICON_FILE_FOLDER, false, false);
short icon = ICON_FILE_FOLDER;
if (group_.color_tag != -1) {
Use
LAYERGROUP_COLOR_NONE
.@blender-bot build
Ah, merged already, thanks for reviewing :)