NW: fix layout errors

Forgot to check for active node and tree type.
This commit is contained in:
Greg Zaal 2016-08-12 21:14:48 +02:00
parent 5882aa8abd
commit 47cdb7f795
1 changed files with 5 additions and 2 deletions

View File

@ -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')
#