UI: Outliner - GP Icon Changes
Changes all GP layer icons to Pencil and highlights selected layer with background color. Differential Revision: https://developer.blender.org/D5073 Reviewed by Dalai Felinto
This commit is contained in:
parent
e76b223ea3
commit
34644f520a
|
@ -1 +1 @@
|
|||
Subproject commit a30fce5376c5a70cb64cff58298b8a392512ef2d
|
||||
Subproject commit dccf8a462ccf10141149dc35416fc27c93abac3a
|
|
@ -2151,17 +2151,8 @@ TreeElementIcon tree_element_get_icon(TreeStoreElem *tselem, TreeElement *te)
|
|||
data.icon = ICON_GROUP;
|
||||
break;
|
||||
}
|
||||
/* Removed the icons from outliner.
|
||||
* Need a better structure with Layers, Palettes and Colors. */
|
||||
case TSE_GP_LAYER: {
|
||||
/* indicate whether layer is active */
|
||||
bGPDlayer *gpl = te->directdata;
|
||||
if (gpl->flag & GP_LAYER_ACTIVE) {
|
||||
data.icon = ICON_GREASEPENCIL;
|
||||
}
|
||||
else {
|
||||
data.icon = ICON_DOT;
|
||||
}
|
||||
data.icon = ICON_GREASEPENCIL;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
@ -2641,12 +2632,16 @@ static void outliner_draw_iconrow(bContext *C,
|
|||
active = tree_element_active(C, scene, view_layer, soops, te, OL_SETSEL_NONE, false);
|
||||
}
|
||||
}
|
||||
else if (tselem->type == TSE_GP_LAYER) {
|
||||
bGPDlayer *gpl = te->directdata;
|
||||
active = (gpl->flag & GP_LAYER_ACTIVE) ? OL_DRAWSEL_ACTIVE : OL_DRAWSEL_NONE;
|
||||
}
|
||||
else {
|
||||
active = tree_element_type_active(
|
||||
C, scene, view_layer, soops, te, tselem, OL_SETSEL_NONE, false);
|
||||
}
|
||||
|
||||
if (!ELEM(tselem->type, 0, TSE_LAYER_COLLECTION, TSE_R_LAYER)) {
|
||||
if (!ELEM(tselem->type, 0, TSE_LAYER_COLLECTION, TSE_R_LAYER, TSE_GP_LAYER)) {
|
||||
outliner_draw_iconrow_doit(block, te, fstyle, xmax, offsx, ys, alpha_fac, active, 1);
|
||||
}
|
||||
else {
|
||||
|
@ -2808,12 +2803,20 @@ static void outliner_draw_tree_element(bContext *C,
|
|||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
active = tree_element_type_active(
|
||||
C, scene, view_layer, soops, te, tselem, OL_SETSEL_NONE, false);
|
||||
/* active collection*/
|
||||
icon_bgcolor[3] = 0.2f;
|
||||
else if (tselem->type == TSE_GP_LAYER) {
|
||||
/* Active grease pencil layer. */
|
||||
if (((bGPDlayer *)te->directdata)->flag & GP_LAYER_ACTIVE) {
|
||||
icon_bgcolor[3] = 0.2f;
|
||||
active = OL_DRAWSEL_ACTIVE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
active = tree_element_type_active(
|
||||
C, scene, view_layer, soops, te, tselem, OL_SETSEL_NONE, false);
|
||||
/* active collection*/
|
||||
icon_bgcolor[3] = 0.2f;
|
||||
}
|
||||
|
||||
/* Checkbox to enable collections. */
|
||||
if ((tselem->type == TSE_LAYER_COLLECTION) &&
|
||||
|
|
Loading…
Reference in New Issue