From 5ebae1c0c07f8c625ac9892c99f1b464c2c79fb3 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sat, 7 Feb 2015 12:50:22 +1300 Subject: GPencil: Initial support for GP Layers in Outliner This is still very rudimentary, and lacks many things. * This needs a better icon. Perhaps we can look into using colour swatches here too like in all the other places? * The "active" check needs to be implemented still * Various restriction toggles to come still --- source/blender/editors/space_outliner/outliner_tree.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/space_outliner/outliner_tree.c') diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index 8a4b6f1444e..273cf75f1bd 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -822,9 +822,10 @@ static void outliner_add_id_contents(SpaceOops *soops, TreeElement *te, TreeStor if (outliner_animdata_test(gpd->adt)) outliner_add_element(soops, &te->subtree, gpd, te, TSE_ANIM_DATA, 0); - + + // TODO: base element for layers? for (gpl = gpd->layers.first; gpl; gpl = gpl->next) { - // TODO + outliner_add_element(soops, &te->subtree, gpl, te, TSE_GP_LAYER, a); a++; } } @@ -875,6 +876,9 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i else if (type == TSE_ANIM_DATA) { /* pass */ } + else if (type == TSE_GP_LAYER) { + /* pass */ + } else if (type == TSE_ID_BASE) { /* pass */ } @@ -957,6 +961,12 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i } } } + else if (type == TSE_GP_LAYER) { + bGPDlayer *gpl = (bGPDlayer *)idv; + + te->name = gpl->info; + te->directdata = gpl; + } else if (type == TSE_SEQUENCE) { Sequence *seq = (Sequence *) idv; Sequence *p; -- cgit v1.2.3