Fix: GPv3: Group color tag icons in outliner and dopesheet
Missed in cea18e62c5.
Pull Request: https://projects.blender.org/blender/blender/pulls/128287
This commit is contained in:
committed by
Falk David
parent
99bf9f4534
commit
17fc09d5aa
@@ -3891,9 +3891,15 @@ static void *layer_setting_ptr(bAnimListElem *ale,
|
||||
return GET_ACF_FLAG_PTR(layer->base.flag, r_type);
|
||||
}
|
||||
|
||||
static int layer_group_icon(bAnimListElem * /*ale*/)
|
||||
static int layer_group_icon(bAnimListElem * ale)
|
||||
{
|
||||
return ICON_GREASEPENCIL_LAYER_GROUP;
|
||||
using namespace bke::greasepencil;
|
||||
const LayerGroup &group = *static_cast<LayerGroup *>(ale->data);
|
||||
int icon = ICON_GREASEPENCIL_LAYER_GROUP;
|
||||
if (group.color_tag != LAYERGROUP_COLOR_NONE) {
|
||||
icon = ICON_LAYERGROUP_COLOR_01 + group.color_tag;
|
||||
}
|
||||
return icon;
|
||||
}
|
||||
|
||||
static void layer_group_color(bAnimContext * /*ac*/, bAnimListElem * /*ale*/, float r_color[3])
|
||||
|
||||
@@ -2947,7 +2947,12 @@ TreeElementIcon tree_element_get_icon(TreeStoreElem *tselem, TreeElement *te)
|
||||
data.icon = ICON_OUTLINER_DATA_GP_LAYER;
|
||||
}
|
||||
else if (node.is_group()) {
|
||||
const bke::greasepencil::LayerGroup &group = node.as_group();
|
||||
|
||||
data.icon = ICON_GREASEPENCIL_LAYER_GROUP;
|
||||
if (group.color_tag != LAYERGROUP_COLOR_NONE) {
|
||||
data.icon = ICON_LAYERGROUP_COLOR_01 + group.color_tag;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user