[Bf-blender-cvs] [e81c1d3d48a] blender2.8: Cleanup: use tuple instead of dict
Campbell Barton
noreply at git.blender.org
Fri Nov 9 03:15:04 CET 2018
Commit: e81c1d3d48aacc94d762b0ca496b546629bfe952
Author: Campbell Barton
Date: Fri Nov 9 13:14:16 2018 +1100
Branches: blender2.8
https://developer.blender.org/rBe81c1d3d48aacc94d762b0ca496b546629bfe952
Cleanup: use tuple instead of dict
This just loops over pairs so no mapping is needed.
===================================================================
M release/scripts/startup/bl_ui/space_view3d.py
===================================================================
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
More information about the Bf-blender-cvs
mailing list