From e81c1d3d48aacc94d762b0ca496b546629bfe952 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 9 Nov 2018 13:14:16 +1100 Subject: Cleanup: use tuple instead of dict This just loops over pairs so no mapping is needed. --- release/scripts/startup/bl_ui/space_view3d.py | 37 +++++++++++++-------------- 1 file changed, 18 insertions(+), 19 deletions(-) (limited to 'release') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 6411ea8702c..536e7fdc6a8 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -3996,27 +3996,26 @@ class VIEW3D_PT_object_type_visibility(Panel): layout.label(text="Object Types Visibility") col = layout.column() - attr_object_types = { + attr_object_types = ( # Geometry - "mesh" : "Mesh", - "curve" : "Curve", - "surf" : "Surface", - "meta" : "Meta", - "font" : "Font", - None : None, + ("mesh", "Mesh"), + ("curve", "Curve"), + ("surf", "Surface"), + ("meta", "Meta"), + ("font", "Font"), + (None, None), # Other - "armature" : "Armature", - "lattice" : "Lattice", - "empty" : "Empty", - "grease_pencil" : "Grease Pencil", - "camera" : "Camera", - "light" : "Light", - "light_probe" : "Light Probe", - "speaker" : "Speaker", - } - - - for attr, attr_name in attr_object_types.items(): + ("armature", "Armature"), + ("lattice", "Lattice"), + ("empty", "Empty"), + ("grease_pencil", "Grease Pencil"), + ("camera", "Camera"), + ("light", "Light"), + ("light_probe", "Light Probe"), + ("speaker", "Speaker"), + ) + + for attr, attr_name in attr_object_types: if attr is None: col.separator() continue -- cgit v1.2.3