Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg <gregzzmail@gmail.com>2016-08-12 22:14:48 +0300
committerGreg <gregzzmail@gmail.com>2016-08-12 22:16:37 +0300
commit47cdb7f795fc3d82030e21415264547ccaae1f95 (patch)
treea5546b541d47da188e50c6645c4ee1f13bca6c74
parent5882aa8abd9626b4dcc4b4a4e47aee330ba9a241 (diff)
NW: fix layout errors
Forgot to check for active node and tree type.
-rw-r--r--node_wrangler.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/node_wrangler.py b/node_wrangler.py
index 69e8b1a0..f1a42adb 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')
#