[Bf-extensions-cvs] [47cdb7f] master: NW: fix layout errors

Greg noreply at git.blender.org
Fri Aug 12 21:17:17 CEST 2016


Commit: 47cdb7f795fc3d82030e21415264547ccaae1f95
Author: Greg
Date:   Fri Aug 12 21:14:48 2016 +0200
Branches: master
https://developer.blender.org/rBA47cdb7f795fc3d82030e21415264547ccaae1f95

NW: fix layout errors

Forgot to check for active node and tree type.

===================================================================

M	node_wrangler.py

===================================================================

diff --git a/node_wrangler.py b/node_wrangler.py
index 69e8b1a..f1a42ad 100644
--- a/node_wrangler.py
+++ b/node_wrangler.py
@@ -3997,8 +3997,11 @@ def bgreset_menu_func(self, context):
 
 
 def save_viewer_menu_func(self, context):
-    if context.scene.node_tree.nodes.active.type == "VIEWER":
-        self.layout.operator(NWSaveViewer.bl_idname, icon='FILE_IMAGE')
+    if nw_check(context):
+        if context.space_data.tree_type == 'CompositorNodeTree':
+            if context.scene.node_tree.nodes.active:
+                if context.scene.node_tree.nodes.active.type == "VIEWER":
+                    self.layout.operator(NWSaveViewer.bl_idname, icon='FILE_IMAGE')
 
 
 #



More information about the Bf-extensions-cvs mailing list