Cleanup: pep8
This commit is contained in:
@@ -57,16 +57,16 @@ class NODE_HT_header(Header):
|
||||
|
||||
ob = context.object
|
||||
if snode.shader_type == 'OBJECT' and ob:
|
||||
|
||||
NODE_MT_editor_menus.draw_collapsible(context, layout)
|
||||
|
||||
# No shader nodes for Eevee lamps
|
||||
if snode_id and not (context.engine == 'BLENDER_EEVEE' and ob.type == 'LAMP'):
|
||||
row = layout.row()
|
||||
row.prop(snode_id, "use_nodes")
|
||||
|
||||
layout.separator_spacer()
|
||||
|
||||
|
||||
NODE_MT_editor_menus.draw_collapsible(context, layout)
|
||||
|
||||
# No shader nodes for Eevee lamps
|
||||
if snode_id and not (context.engine == 'BLENDER_EEVEE' and ob.type == 'LAMP'):
|
||||
row = layout.row()
|
||||
row.prop(snode_id, "use_nodes")
|
||||
|
||||
layout.separator_spacer()
|
||||
|
||||
row = layout.row()
|
||||
# disable material slot buttons when pinned, cannot find correct slot within id_from (#36589)
|
||||
row.enabled = not snode.pin
|
||||
@@ -77,54 +77,54 @@ class NODE_HT_header(Header):
|
||||
if id_from and ob.type != 'LAMP':
|
||||
row.template_ID(id_from, "active_material", new="material.new")
|
||||
|
||||
if snode.shader_type == 'WORLD':
|
||||
if snode.shader_type == 'WORLD':
|
||||
|
||||
NODE_MT_editor_menus.draw_collapsible(context, layout)
|
||||
|
||||
if snode_id:
|
||||
row = layout.row()
|
||||
row = layout.row()
|
||||
row.prop(snode_id, "use_nodes")
|
||||
|
||||
layout.separator_spacer()
|
||||
|
||||
row = layout.row()
|
||||
row.enabled = not snode.pin
|
||||
row.template_ID(scene, "world", new="world.new")
|
||||
layout.separator_spacer()
|
||||
|
||||
row = layout.row()
|
||||
row.enabled = not snode.pin
|
||||
row.template_ID(scene, "world", new="world.new")
|
||||
|
||||
if snode.shader_type == 'LINESTYLE':
|
||||
view_layer = context.view_layer
|
||||
lineset = view_layer.freestyle_settings.linesets.active
|
||||
|
||||
if lineset is not None:
|
||||
if lineset is not None:
|
||||
NODE_MT_editor_menus.draw_collapsible(context, layout)
|
||||
|
||||
if snode_id:
|
||||
row = layout.row()
|
||||
row = layout.row()
|
||||
row.prop(snode_id, "use_nodes")
|
||||
|
||||
layout.separator_spacer()
|
||||
|
||||
row = layout.row()
|
||||
row.enabled = not snode.pin
|
||||
row.template_ID(lineset, "linestyle", new="scene.freestyle_linestyle_new")
|
||||
|
||||
layout.separator_spacer()
|
||||
|
||||
row = layout.row()
|
||||
row.enabled = not snode.pin
|
||||
row.template_ID(lineset, "linestyle", new="scene.freestyle_linestyle_new")
|
||||
|
||||
elif snode.tree_type == 'TextureNodeTree':
|
||||
layout.prop(snode, "texture_type", text="", expand=True)
|
||||
|
||||
NODE_MT_editor_menus.draw_collapsible(context, layout)
|
||||
|
||||
if snode_id:
|
||||
layout.prop(snode_id, "use_nodes")
|
||||
|
||||
layout.separator_spacer()
|
||||
|
||||
NODE_MT_editor_menus.draw_collapsible(context, layout)
|
||||
|
||||
if snode_id:
|
||||
layout.prop(snode_id, "use_nodes")
|
||||
|
||||
layout.separator_spacer()
|
||||
|
||||
if id_from:
|
||||
if snode.texture_type == 'BRUSH':
|
||||
layout.template_ID(id_from, "texture", new="texture.new")
|
||||
else:
|
||||
layout.template_ID(id_from, "active_texture", new="texture.new")
|
||||
|
||||
elif snode.tree_type == 'CompositorNodeTree':
|
||||
elif snode.tree_type == 'CompositorNodeTree':
|
||||
|
||||
NODE_MT_editor_menus.draw_collapsible(context, layout)
|
||||
|
||||
@@ -141,9 +141,9 @@ class NODE_HT_header(Header):
|
||||
# Custom node tree is edited as independent ID block
|
||||
NODE_MT_editor_menus.draw_collapsible(context, layout)
|
||||
|
||||
layout.separator_spacer()
|
||||
|
||||
layout.template_ID(snode, "node_tree", new="node.new_node_tree")
|
||||
layout.separator_spacer()
|
||||
|
||||
layout.template_ID(snode, "node_tree", new="node.new_node_tree")
|
||||
layout.separator_spacer()
|
||||
|
||||
layout.prop(snode, "pin", text="")
|
||||
|
Reference in New Issue
Block a user