Cleanup: use static set for contains checks

Also replace contains check with equality for a single item.
This commit is contained in:
Campbell Barton 2023-10-05 13:53:20 +11:00
parent 9d4dc5376c
commit 6bd57e1f1f
4 changed files with 4 additions and 4 deletions

View File

@ -390,7 +390,7 @@ class OBJECT_PT_visibility(ObjectButtonsPanel, Panel):
col.prop(ob, "hide_render", text="Renders", toggle=False, invert_checkbox=True)
if context.engine == 'BLENDER_EEVEE_NEXT':
if ob.type in ('MESH', 'CURVE', 'SURFACE', 'META', 'FONT', 'CURVES', 'POINTCLOUD', 'VOLUME', 'LIGHT'):
if ob.type in {'MESH', 'CURVE', 'SURFACE', 'META', 'FONT', 'CURVES', 'POINTCLOUD', 'VOLUME', 'LIGHT'}:
layout.separator()
col = layout.column(heading="Light Probes")
col.prop(ob, "hide_probe_volume", text="Volume", toggle=False, invert_checkbox=True)

View File

@ -309,7 +309,7 @@ class DOPESHEET_PT_snapping(Panel):
col.label(text="Snap To")
tool_settings = context.tool_settings
col.prop(tool_settings, "snap_anim_element", expand=True)
if tool_settings.snap_anim_element not in ('MARKER', ):
if tool_settings.snap_anim_element != 'MARKER':
col.prop(tool_settings, "use_snap_time_absolute")

View File

@ -112,7 +112,7 @@ class GRAPH_PT_snapping(Panel):
col.label(text="Snap To")
tool_settings = context.tool_settings
col.prop(tool_settings, "snap_anim_element", expand=True)
if tool_settings.snap_anim_element not in ('MARKER', ):
if tool_settings.snap_anim_element != 'MARKER':
col.prop(tool_settings, "use_snap_time_absolute")

View File

@ -54,7 +54,7 @@ class NLA_PT_snapping(Panel):
col.label(text="Snap To")
tool_settings = context.tool_settings
col.prop(tool_settings, "snap_anim_element", expand=True)
if tool_settings.snap_anim_element not in ('MARKER', ):
if tool_settings.snap_anim_element != 'MARKER':
col.prop(tool_settings, "use_snap_time_absolute")