diff options
author | Greg <gregzzmail@gmail.com> | 2016-08-12 22:14:48 +0300 |
---|---|---|
committer | Greg <gregzzmail@gmail.com> | 2016-08-12 22:16:37 +0300 |
commit | 47cdb7f795fc3d82030e21415264547ccaae1f95 (patch) | |
tree | a5546b541d47da188e50c6645c4ee1f13bca6c74 | |
parent | 5882aa8abd9626b4dcc4b4a4e47aee330ba9a241 (diff) |
NW: fix layout errors
Forgot to check for active node and tree type.
-rw-r--r-- | node_wrangler.py | 7 |
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') # |