UI: Header consistency for Node editor
Also move use_insert_offset to the View menu as it is not toggled that often to take space in the header.
This commit is contained in:
@@ -53,7 +53,7 @@ class NODE_HT_header(Header):
|
||||
# layout.prop(snode, "tree_type", text="")
|
||||
|
||||
if snode.tree_type == 'ShaderNodeTree':
|
||||
layout.prop(snode, "shader_type", text="", expand=True)
|
||||
layout.prop(snode, "shader_type", text="")
|
||||
|
||||
ob = context.object
|
||||
if snode.shader_type == 'OBJECT' and ob:
|
||||
@@ -109,7 +109,7 @@ class NODE_HT_header(Header):
|
||||
row.template_ID(lineset, "linestyle", new="scene.freestyle_linestyle_new")
|
||||
|
||||
elif snode.tree_type == 'TextureNodeTree':
|
||||
layout.prop(snode, "texture_type", text="", expand=True)
|
||||
layout.prop(snode, "texture_type", text="")
|
||||
|
||||
NODE_MT_editor_menus.draw_collapsible(context, layout)
|
||||
|
||||
@@ -144,16 +144,14 @@ class NODE_HT_header(Header):
|
||||
layout.separator_spacer()
|
||||
|
||||
layout.template_ID(snode, "node_tree", new="node.new_node_tree")
|
||||
|
||||
layout.separator_spacer()
|
||||
|
||||
layout.template_running_jobs()
|
||||
|
||||
layout.prop(snode, "pin", text="")
|
||||
layout.operator("node.tree_path_parent", text="", icon='FILE_PARENT')
|
||||
|
||||
layout.separator()
|
||||
|
||||
# Auto-offset nodes (called "insert_offset" in code)
|
||||
layout.prop(snode, "use_insert_offset", text="")
|
||||
|
||||
# Snap
|
||||
row = layout.row(align=True)
|
||||
row.prop(toolsettings, "use_snap", text="")
|
||||
@@ -165,8 +163,6 @@ class NODE_HT_header(Header):
|
||||
row.operator("node.clipboard_copy", text="", icon='COPYDOWN')
|
||||
row.operator("node.clipboard_paste", text="", icon='PASTEDOWN')
|
||||
|
||||
layout.template_running_jobs()
|
||||
|
||||
|
||||
class NODE_MT_editor_menus(Menu):
|
||||
bl_idname = "NODE_MT_editor_menus"
|
||||
@@ -204,11 +200,18 @@ class NODE_MT_view(Menu):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
snode = context.space_data
|
||||
|
||||
layout.operator("node.properties", icon='MENU_PANEL')
|
||||
layout.operator("node.toolbar", icon='MENU_PANEL')
|
||||
|
||||
layout.separator()
|
||||
|
||||
# Auto-offset nodes (called "insert_offset" in code)
|
||||
layout.prop(snode, "use_insert_offset")
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("view2d.zoom_in")
|
||||
layout.operator("view2d.zoom_out")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user