Cleanup: redundant static set use
This commit is contained in:
@@ -95,7 +95,7 @@ class MESH_UL_fmaps(UIList):
|
||||
fmap = item
|
||||
if self.layout_type in {'DEFAULT', 'COMPACT'}:
|
||||
layout.prop(fmap, "name", text="", emboss=False, icon='FACE_MAPS')
|
||||
elif self.layout_type in {'GRID'}:
|
||||
elif self.layout_type == 'GRID':
|
||||
layout.alignment = 'CENTER'
|
||||
layout.label(text="", icon_value=icon)
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ class AnnotationDrawingToolsPanel:
|
||||
col.separator()
|
||||
col.separator()
|
||||
|
||||
if context.space_data.type in {'CLIP_EDITOR'}:
|
||||
if context.space_data.type == 'CLIP_EDITOR':
|
||||
col.separator()
|
||||
col.label(text="Data Source:")
|
||||
row = col.row(align=True)
|
||||
|
||||
@@ -381,7 +381,7 @@ class RENDER_PT_encoding_video(RenderOutputButtonsPanel, Panel):
|
||||
if needs_codec and ffmpeg.codec == 'NONE':
|
||||
return
|
||||
|
||||
if ffmpeg.codec in {'DNXHD'}:
|
||||
if ffmpeg.codec == 'DNXHD':
|
||||
layout.prop(ffmpeg, "use_lossless_output")
|
||||
|
||||
# Output quality
|
||||
|
||||
@@ -820,7 +820,7 @@ class PARTICLE_PT_physics_boids_movement(ParticleButtonsPanel, Panel):
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
part = particle_get_settings(context)
|
||||
return part.physics_type in {'BOIDS'}
|
||||
return part.physics_type == 'BOIDS'
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
@@ -873,7 +873,7 @@ class PARTICLE_PT_physics_boids_battle(ParticleButtonsPanel, Panel):
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
part = particle_get_settings(context)
|
||||
return part.physics_type in {'BOIDS'}
|
||||
return part.physics_type == 'BOIDS'
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
@@ -900,7 +900,7 @@ class PARTICLE_PT_physics_boids_misc(ParticleButtonsPanel, Panel):
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
part = particle_get_settings(context)
|
||||
return part.physics_type in {'BOIDS'}
|
||||
return part.physics_type == 'BOIDS'
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
@@ -1232,8 +1232,7 @@ class PARTICLE_PT_render(ParticleButtonsPanel, Panel):
|
||||
part.type == 'EMITTER' or
|
||||
(part.render_type in {'OBJECT', 'COLLECTION'} and part.type == 'HAIR')
|
||||
):
|
||||
if part.render_type not in {'NONE'}:
|
||||
|
||||
if part.render_type != 'NONE':
|
||||
col = layout.column(align=True)
|
||||
col.prop(part, "particle_size", text="Scale")
|
||||
col.prop(part, "size_random", slider=True, text="Scale Randomness")
|
||||
|
||||
@@ -366,7 +366,7 @@ class PHYSICS_PT_rigid_body_constraint_springs(PHYSICS_PT_rigidbody_constraint_p
|
||||
rbc = ob.rigid_body_constraint
|
||||
|
||||
return (ob and ob.rigid_body_constraint
|
||||
and rbc.type in {'GENERIC_SPRING'}
|
||||
and rbc.type == 'GENERIC_SPRING'
|
||||
and context.engine in cls.COMPAT_ENGINES)
|
||||
|
||||
def draw(self, context):
|
||||
@@ -390,7 +390,7 @@ class PHYSICS_PT_rigid_body_constraint_springs_angular(PHYSICS_PT_rigidbody_cons
|
||||
rbc = ob.rigid_body_constraint
|
||||
|
||||
return (ob and ob.rigid_body_constraint
|
||||
and rbc.type in {'GENERIC_SPRING'}
|
||||
and rbc.type == 'GENERIC_SPRING'
|
||||
and context.engine in cls.COMPAT_ENGINES)
|
||||
|
||||
def draw(self, context):
|
||||
@@ -438,7 +438,7 @@ class PHYSICS_PT_rigid_body_constraint_springs_linear(PHYSICS_PT_rigidbody_const
|
||||
rbc = ob.rigid_body_constraint
|
||||
|
||||
return (ob and ob.rigid_body_constraint
|
||||
and rbc.type in {'GENERIC_SPRING'}
|
||||
and rbc.type == 'GENERIC_SPRING'
|
||||
and context.engine in cls.COMPAT_ENGINES)
|
||||
|
||||
def draw(self, context):
|
||||
|
||||
@@ -699,7 +699,7 @@ class VIEW3D_HT_header(Header):
|
||||
sub.popover(panel="VIEW3D_PT_overlay", text="")
|
||||
|
||||
row = layout.row()
|
||||
row.active = (shading.type in {'WIREFRAME', 'SOLID'}) or object_mode in {'EDIT'}
|
||||
row.active = (object_mode == 'EDIT') or (shading.type in {'WIREFRAME', 'SOLID'})
|
||||
|
||||
if shading.type == 'WIREFRAME':
|
||||
row.prop(shading, "show_xray_wireframe", text="", icon='XRAY')
|
||||
@@ -6021,14 +6021,14 @@ class VIEW3D_PT_gpencil_guide(Panel):
|
||||
col.active = settings.use_guide
|
||||
col.prop(settings, "type", expand=True)
|
||||
|
||||
if settings.type in {'PARALLEL'}:
|
||||
if settings.type == 'PARALLEL':
|
||||
col.prop(settings, "angle")
|
||||
row = col.row(align=True)
|
||||
|
||||
col.prop(settings, "use_snapping")
|
||||
if settings.use_snapping:
|
||||
|
||||
if settings.type in {'RADIAL'}:
|
||||
if settings.type == 'RADIAL':
|
||||
col.prop(settings, "angle_snap")
|
||||
else:
|
||||
col.prop(settings, "spacing")
|
||||
@@ -6036,9 +6036,9 @@ class VIEW3D_PT_gpencil_guide(Panel):
|
||||
col.label(text="Reference Point")
|
||||
row = col.row(align=True)
|
||||
row.prop(settings, "reference_point", expand=True)
|
||||
if settings.reference_point in {'CUSTOM'}:
|
||||
if settings.reference_point == 'CUSTOM':
|
||||
col.prop(settings, "location", text="Custom Location")
|
||||
if settings.reference_point in {'OBJECT'}:
|
||||
elif settings.reference_point == 'OBJECT':
|
||||
col.prop(settings, "reference_object", text="Object Location")
|
||||
if not settings.reference_object:
|
||||
col.label(text="No object selected, using cursor")
|
||||
|
||||
Reference in New Issue
Block a user