Cleanup: prefer tuples over lists

This commit is contained in:
Campbell Barton 2017-08-02 07:53:58 +10:00
parent c42c129393
commit 4afc94080c
3 changed files with 8 additions and 8 deletions

View File

@ -1003,7 +1003,7 @@ class CyclesLamp_PT_nodes(CyclesButtonsPanel, Panel):
layout = self.layout
lamp = context.lamp
if not panel_node_draw(layout, lamp, ['OUTPUT_LAMP'], 'Surface'):
if not panel_node_draw(layout, lamp, ('OUTPUT_LAMP',), 'Surface'):
layout.prop(lamp, "color")
@ -1058,7 +1058,7 @@ class CyclesWorld_PT_surface(CyclesButtonsPanel, Panel):
world = context.world
if not panel_node_draw(layout, world, ['OUTPUT_WORLD'], 'Surface'):
if not panel_node_draw(layout, world, ('OUTPUT_WORLD',), 'Surface'):
layout.prop(world, "horizon_color", text="Color")
@ -1076,7 +1076,7 @@ class CyclesWorld_PT_volume(CyclesButtonsPanel, Panel):
layout = self.layout
world = context.world
panel_node_draw(layout, world, ['OUTPUT_WORLD'], 'Volume')
panel_node_draw(layout, world, ('OUTPUT_WORLD',), 'Volume')
class CyclesWorld_PT_ambient_occlusion(CyclesButtonsPanel, Panel):
@ -1221,7 +1221,7 @@ class CyclesMaterial_PT_surface(CyclesButtonsPanel, Panel):
layout = self.layout
mat = context.material
if not panel_node_draw(layout, mat, ['OUTPUT_MATERIAL', 'OUTPUT_EEVEE_MATERIAL'], 'Surface'):
if not panel_node_draw(layout, mat, ('OUTPUT_MATERIAL', 'OUTPUT_EEVEE_MATERIAL'), 'Surface'):
layout.prop(mat, "diffuse_color")
@ -1241,7 +1241,7 @@ class CyclesMaterial_PT_volume(CyclesButtonsPanel, Panel):
mat = context.material
# cmat = mat.cycles
panel_node_draw(layout, mat, ['OUTPUT_MATERIAL', 'OUTPUT_EEVEE_MATERIAL'], 'Volume')
panel_node_draw(layout, mat, ('OUTPUT_MATERIAL', 'OUTPUT_EEVEE_MATERIAL'), 'Volume')
class CyclesMaterial_PT_displacement(CyclesButtonsPanel, Panel):
@ -1257,7 +1257,7 @@ class CyclesMaterial_PT_displacement(CyclesButtonsPanel, Panel):
layout = self.layout
mat = context.material
panel_node_draw(layout, mat, ['OUTPUT_MATERIAL', 'OUTPUT_EEVEE_MATERIAL'], 'Displacement')
panel_node_draw(layout, mat, ('OUTPUT_MATERIAL', 'OUTPUT_EEVEE_MATERIAL'), 'Displacement')
class CyclesMaterial_PT_settings(CyclesButtonsPanel, Panel):

View File

@ -1147,7 +1147,7 @@ class EEVEE_MATERIAL_PT_surface(MaterialButtonsPanel, Panel):
layout.separator()
if mat.use_nodes:
panel_node_draw(layout, mat.node_tree, ['OUTPUT_EEVEE_MATERIAL', 'OUTPUT_MATERIAL'])
panel_node_draw(layout, mat.node_tree, ('OUTPUT_EEVEE_MATERIAL', 'OUTPUT_MATERIAL'))
else:
raym = mat.raytrace_mirror
layout.prop(mat, "diffuse_color", text="Base Color")

View File

@ -270,7 +270,7 @@ class EEVEE_WORLD_PT_surface(WorldButtonsPanel, Panel):
if world.use_nodes:
ntree = world.node_tree
node = find_output_node(ntree, ['OUTPUT_WORLD'])
node = find_output_node(ntree, ('OUTPUT_WORLD',))
if node:
input = find_node_input(node, 'Surface')