diff options
author | Joshua Leung <aligorith@gmail.com> | 2015-02-07 02:28:17 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2015-02-07 02:28:17 +0300 |
commit | 68fc2e210ec0a3712540bc535bd9c82b939861ce (patch) | |
tree | ad00064c5011dd59fa7b65612588649673b2022e /source/blender/editors/space_outliner/outliner_tree.c | |
parent | ca06c3343e4c295029a74ffdbafbed1b8a7911ec (diff) |
GPencil: Initial support for Grease Pencil in the Outliner
This commit just adds entries for the Grease Pencil datablocks in the Outliner.
Currently, there's not much more to see here, but the following commits will see
to that.
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_tree.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_tree.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index c7cd4fa29d1..8a4b6f1444e 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -38,6 +38,7 @@ #include "DNA_armature_types.h" #include "DNA_constraint_types.h" #include "DNA_camera_types.h" +#include "DNA_gpencil_types.h" #include "DNA_group_types.h" #include "DNA_key_types.h" #include "DNA_lamp_types.h" @@ -430,6 +431,8 @@ static void outliner_add_scene_contents(SpaceOops *soops, ListBase *lb, Scene *s // TODO: move this to the front? if (outliner_animdata_test(sce->adt)) outliner_add_element(soops, lb, sce, te, TSE_ANIM_DATA, 0); + + outliner_add_element(soops, lb, sce->gpd, te, 0, 0); outliner_add_element(soops, lb, sce->world, te, 0, 0); @@ -451,6 +454,8 @@ static void outliner_add_object_contents(SpaceOops *soops, TreeElement *te, Tree if (ob->proxy && ob->id.lib == NULL) outliner_add_element(soops, &te->subtree, ob->proxy, te, TSE_PROXY, 0); + + outliner_add_element(soops, &te->subtree, ob->gpd, te, 0, 0); outliner_add_element(soops, &te->subtree, ob->data, te, 0, 0); @@ -809,6 +814,20 @@ static void outliner_add_id_contents(SpaceOops *soops, TreeElement *te, TreeStor } break; } + case ID_GD: + { + bGPdata *gpd = (bGPdata *)id; + bGPDlayer *gpl; + int a = 0; + + if (outliner_animdata_test(gpd->adt)) + outliner_add_element(soops, &te->subtree, gpd, te, TSE_ANIM_DATA, 0); + + for (gpl = gpd->layers.first; gpl; gpl = gpl->next) { + // TODO + a++; + } + } } } |