diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-11-09 05:14:16 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-11-09 05:14:48 +0300 |
commit | e81c1d3d48aacc94d762b0ca496b546629bfe952 (patch) | |
tree | ebab8be8f06e83395479bfe70c35d34bf2489030 /release | |
parent | 87186f49cc5ac8e858e9515abfd615219d76ce95 (diff) |
Cleanup: use tuple instead of dict
This just loops over pairs so no mapping is needed.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 37 |
1 files changed, 18 insertions, 19 deletions
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 |