diff options
author | Joshua Leung <aligorith@gmail.com> | 2011-06-27 07:54:33 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2011-06-27 07:54:33 +0400 |
commit | b6bc47eb098261189c63b3aecb806960db6235e1 (patch) | |
tree | 21b7fffb95505afbc686751ea29fe862144769b9 /source/blender/editors/space_nla | |
parent | 17da597cc83eaaacdb7d70bb8c8f74aee872f4d3 (diff) |
AnimChannelFiltering - Material Nodes support
Animation for Material nodes is now shown in Animation Editors :)
Diffstat (limited to 'source/blender/editors/space_nla')
-rw-r--r-- | source/blender/editors/space_nla/nla_draw.c | 43 |
1 files changed, 41 insertions, 2 deletions
diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c index dc9594c6e4c..5138569539e 100644 --- a/source/blender/editors/space_nla/nla_draw.c +++ b/source/blender/editors/space_nla/nla_draw.c @@ -38,6 +38,7 @@ #include <float.h> #include "DNA_anim_types.h" +#include "DNA_node_types.h" #include "DNA_screen_types.h" #include "DNA_space_types.h" #include "DNA_windowmanager_types.h" @@ -608,9 +609,28 @@ static void draw_nla_channel_list_gl (bAnimContext *ac, ListBase *anim_data, Vie if (ale->id) { /* special exception for textures */ if (GS(ale->id->name) == ID_TE) { - offset= 21; + offset= 14; indent= 1; } + /* special exception for nodetrees */ + else if (GS(ale->id->name) == ID_NT) { + bNodeTree *ntree = (bNodeTree *)ale->id; + + switch (ntree->type) { + case NTREE_SHADER: + { + /* same as for textures */ + offset= 14; + indent= 1; + } + break; + + default: + /* normal will do */ + offset= 14; + break; + } + } else offset= 14; } @@ -656,9 +676,28 @@ static void draw_nla_channel_list_gl (bAnimContext *ac, ListBase *anim_data, Vie if (ale->id) { /* special exception for textures */ if (GS(ale->id->name) == ID_TE) { - offset= 21; + offset= 14; indent= 1; } + /* special exception for nodetrees */ + else if (GS(ale->id->name) == ID_NT) { + bNodeTree *ntree = (bNodeTree *)ale->id; + + switch (ntree->type) { + case NTREE_SHADER: + { + /* same as for textures */ + offset= 14; + indent= 1; + } + break; + + default: + /* normal will do */ + offset= 14; + break; + } + } else offset= 14; } |