NW: fix layout errors
Forgot to check for active node and tree type.
This commit is contained in:
parent
5882aa8abd
commit
47cdb7f795
|
@ -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')
|
||||
|
||||
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue