Grease Pencil: Channel color for groups

`channel_color` property was created for layers in 03b2fc744e. Now
exposed for layer groups too.

Pull Request: https://projects.blender.org/blender/blender/pulls/135088
This commit is contained in:
Pratik Borhade
2025-02-25 09:44:21 +01:00
committed by Pratik Borhade
parent cd9156bb32
commit e51fff61c5
2 changed files with 24 additions and 1 deletions

View File

@@ -334,6 +334,28 @@ class DATA_PT_grease_pencil_layer_display(LayerDataButtonsPanel, GreasePencil_La
bl_options = {'DEFAULT_CLOSED'}
class DATA_PT_grease_pencil_layer_group_display(Panel):
bl_label = "Display"
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "data"
bl_options = {'DEFAULT_CLOSED'}
@classmethod
def poll(cls, context):
grease_pencil = context.grease_pencil
return grease_pencil and grease_pencil.layer_groups.active
def draw(self, context):
layout = self.layout
layout.use_property_split = True
grease_pencil = context.grease_pencil
group = grease_pencil.layer_groups.active
layout.prop(group, "channel_color", text="Channel Color")
class DATA_PT_grease_pencil_onion_skinning(DataButtonsPanel, Panel):
bl_label = "Onion Skinning"
@@ -494,6 +516,7 @@ classes = (
DATA_PT_grease_pencil_layer_adjustments,
DATA_PT_grease_pencil_layer_relations,
DATA_PT_grease_pencil_layer_display,
DATA_PT_grease_pencil_layer_group_display,
DATA_PT_grease_pencil_onion_skinning,
DATA_PT_grease_pencil_onion_skinning_custom_colors,
DATA_PT_grease_pencil_onion_skinning_display,

View File

@@ -4055,7 +4055,7 @@ static bAnimChannelType ACF_GPLGROUP = {
/*channel_role*/ ACHANNEL_ROLE_EXPANDER,
/*get_backdrop_color*/ greasepencil::layer_group_color,
/*get_channel_color*/ nullptr,
/*get_channel_color*/ greasepencil::layer_channel_color,
/*draw_backdrop*/ acf_group_backdrop,
/*get_indent_level*/ acf_generic_indentation_0,
/*get_offset*/ greasepencil::layer_offset,