From b6bc47eb098261189c63b3aecb806960db6235e1 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Mon, 27 Jun 2011 03:54:33 +0000 Subject: AnimChannelFiltering - Material Nodes support Animation for Material nodes is now shown in Animation Editors :) --- source/blender/editors/space_nla/nla_draw.c | 43 +++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/space_nla') 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 #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; } -- cgit v1.2.3