Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-07-12 11:54:30 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-07-12 11:54:53 +0300
commit75d69eab69307891f197ff1c93b8a7e4454cccf7 (patch)
treee89c04df59cc3c1d1acca7410d391d63d58046d5 /release
parent77928c2a091581939ec40231ce043c6a2f3bf783 (diff)
Minor cleanup to last commit
No need to make attr-lists with the current layout logic.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py53
1 files changed, 24 insertions, 29 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index e3463017237..db5efeb43c2 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -3709,41 +3709,36 @@ class VIEW3D_PT_object_type_visibility(Panel):
col = layout.column()
- attr_object_types_all = (
- (
- "mesh",
- "curve",
- "surf",
- "meta",
- "font",
- ),
- (
- "armature",
- "lattice",
- "empty",
- "camera",
- "lamp",
- "light_probe",
- "speaker",
- ),
+ attr_object_types = (
+ "mesh",
+ "curve",
+ "surf",
+ "meta",
+ "font",
+ None,
+ "armature",
+ "lattice",
+ "empty",
+ "camera",
+ "lamp",
+ "light_probe",
+ "speaker",
)
- is_first = True
- for attr_object_types in attr_object_types_all:
- if is_first is False:
+ for attr in attr_object_types:
+ if attr is None:
col.separator()
- is_first = False
+ continue
- attr_vis = ["show_object_viewport_" f"{attr:s}" for attr in attr_object_types]
- attr_sel = ["show_object_select_" f"{attr:s}" for attr in attr_object_types]
+ attr_v = "show_object_viewport_" f"{attr:s}"
+ attr_s = "show_object_select_" f"{attr:s}"
- for attr_v, attr_s in zip(attr_vis, attr_sel):
- icon_s = 'RESTRICT_SELECT_OFF' if getattr(view, attr_s) else 'RESTRICT_SELECT_ON'
+ icon_s = 'RESTRICT_SELECT_OFF' if getattr(view, attr_s) else 'RESTRICT_SELECT_ON'
- row = col.row(align=True)
- row.prop(view, attr_v)
- row.active = getattr(view, attr_v)
- row.prop(view, attr_s, text="", icon=icon_s, emboss=False)
+ row = col.row(align=True)
+ row.prop(view, attr_v)
+ row.active = getattr(view, attr_v)
+ row.prop(view, attr_s, text="", icon=icon_s, emboss=False)
class VIEW3D_PT_shading(Panel):