UI: Compositor: Show Parent button when available
The Parent Node Tree operator button to go up a level in nested node trees is always visible in the header, regardless if we are currently in a nested tree or not. Only show the button when it is actually possible to go a level up. This frees up space in the header when at the top level.
This commit is contained in:
@@ -197,7 +197,8 @@ class NODE_HT_header(Header):
|
||||
if is_compositor:
|
||||
layout.prop(snode, "pin", text="", emboss=False)
|
||||
|
||||
layout.operator("node.tree_path_parent", text="", icon='FILE_PARENT')
|
||||
if len(snode.path) > 1:
|
||||
layout.operator("node.tree_path_parent", text="", icon='FILE_PARENT')
|
||||
|
||||
# Backdrop
|
||||
if is_compositor:
|
||||
|
||||
Reference in New Issue
Block a user