recent addition: Shift+H in node editor was switching the preview of node types that...
authorCampbell Barton <ideasman42@gmail.com>
Wed, 9 Jun 2010 14:17:22 +0000 (14:17 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 9 Jun 2010 14:17:22 +0000 (14:17 +0000)
source/blender/editors/space_node/node_edit.c

index 2fae827..97e2eba 100644 (file)
@@ -1995,6 +1995,10 @@ static void node_flag_toggle_exec(SpaceNode *snode, int toggle_flag)
 
        for(node= snode->edittree->nodes.first; node; node= node->next) {
                if(node->flag & SELECT) {
+
+                       if(toggle_flag== NODE_PREVIEW && (node->typeinfo->flag & NODE_PREVIEW)==0)
+                               continue;
+
                        if(node->flag & toggle_flag)
                                tot_eq++;
                        else
@@ -2003,6 +2007,10 @@ static void node_flag_toggle_exec(SpaceNode *snode, int toggle_flag)
        }
        for(node= snode->edittree->nodes.first; node; node= node->next) {
                if(node->flag & SELECT) {
+
+                       if(toggle_flag== NODE_PREVIEW && (node->typeinfo->flag & NODE_PREVIEW)==0)
+                               continue;
+
                        if( (tot_eq && tot_neq) || tot_eq==0)
                                node->flag |= toggle_flag;
                        else