Cleanup: prefer tuples over lists
This commit is contained in:
@@ -1003,7 +1003,7 @@ class CyclesLamp_PT_nodes(CyclesButtonsPanel, Panel):
|
|||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
lamp = context.lamp
|
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")
|
layout.prop(lamp, "color")
|
||||||
|
|
||||||
|
|
||||||
@@ -1058,7 +1058,7 @@ class CyclesWorld_PT_surface(CyclesButtonsPanel, Panel):
|
|||||||
|
|
||||||
world = context.world
|
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")
|
layout.prop(world, "horizon_color", text="Color")
|
||||||
|
|
||||||
|
|
||||||
@@ -1076,7 +1076,7 @@ class CyclesWorld_PT_volume(CyclesButtonsPanel, Panel):
|
|||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
world = context.world
|
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):
|
class CyclesWorld_PT_ambient_occlusion(CyclesButtonsPanel, Panel):
|
||||||
@@ -1221,7 +1221,7 @@ class CyclesMaterial_PT_surface(CyclesButtonsPanel, Panel):
|
|||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
mat = context.material
|
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")
|
layout.prop(mat, "diffuse_color")
|
||||||
|
|
||||||
|
|
||||||
@@ -1241,7 +1241,7 @@ class CyclesMaterial_PT_volume(CyclesButtonsPanel, Panel):
|
|||||||
mat = context.material
|
mat = context.material
|
||||||
# cmat = mat.cycles
|
# 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):
|
class CyclesMaterial_PT_displacement(CyclesButtonsPanel, Panel):
|
||||||
@@ -1257,7 +1257,7 @@ class CyclesMaterial_PT_displacement(CyclesButtonsPanel, Panel):
|
|||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
mat = context.material
|
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):
|
class CyclesMaterial_PT_settings(CyclesButtonsPanel, Panel):
|
||||||
|
|||||||
@@ -1147,7 +1147,7 @@ class EEVEE_MATERIAL_PT_surface(MaterialButtonsPanel, Panel):
|
|||||||
layout.separator()
|
layout.separator()
|
||||||
|
|
||||||
if mat.use_nodes:
|
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:
|
else:
|
||||||
raym = mat.raytrace_mirror
|
raym = mat.raytrace_mirror
|
||||||
layout.prop(mat, "diffuse_color", text="Base Color")
|
layout.prop(mat, "diffuse_color", text="Base Color")
|
||||||
|
|||||||
@@ -270,7 +270,7 @@ class EEVEE_WORLD_PT_surface(WorldButtonsPanel, Panel):
|
|||||||
|
|
||||||
if world.use_nodes:
|
if world.use_nodes:
|
||||||
ntree = world.node_tree
|
ntree = world.node_tree
|
||||||
node = find_output_node(ntree, ['OUTPUT_WORLD'])
|
node = find_output_node(ntree, ('OUTPUT_WORLD',))
|
||||||
|
|
||||||
if node:
|
if node:
|
||||||
input = find_node_input(node, 'Surface')
|
input = find_node_input(node, 'Surface')
|
||||||
|
|||||||
Reference in New Issue
Block a user