Cleanup: use single quotes for enum literals

This commit is contained in:
Campbell Barton 2021-01-13 16:37:10 +11:00
parent 37c5552742
commit 97a6b3ceee
6 changed files with 18 additions and 18 deletions

View File

@ -788,9 +788,9 @@ def km_outliner(params):
("outliner.select_box", {"type": 'B', "value": 'PRESS'}, None),
("outliner.select_box", {"type": 'EVT_TWEAK_L', "value": 'ANY'}, {"properties": [("tweak", True)]}),
("outliner.select_box", {"type": 'EVT_TWEAK_L', "value": 'ANY', "shift": True},
{"properties": [("tweak", True), ("mode", "ADD")]}),
{"properties": [("tweak", True), ("mode", 'ADD')]}),
("outliner.select_box", {"type": 'EVT_TWEAK_L', "value": 'ANY', "ctrl": True},
{"properties": [("tweak", True), ("mode", "SUB")]}),
{"properties": [("tweak", True), ("mode", 'SUB')]}),
("outliner.select_walk", {"type": 'UP_ARROW', "value": 'PRESS', "repeat": True},
{"properties": [("direction", 'UP')]}),
("outliner.select_walk", {"type": 'UP_ARROW', "value": 'PRESS', "shift": True, "repeat": True},
@ -1445,7 +1445,7 @@ def km_time_scrub(_params):
)
items.extend([
("anim.change_frame", {"type": "LEFTMOUSE", "value": 'PRESS'}, None),
("anim.change_frame", {"type": 'LEFTMOUSE', "value": 'PRESS'}, None),
])
return keymap
@ -1460,7 +1460,7 @@ def km_time_scrub_clip(_params):
)
items.extend([
("clip.change_frame", {"type": "LEFTMOUSE", "value": 'PRESS'}, None),
("clip.change_frame", {"type": 'LEFTMOUSE', "value": 'PRESS'}, None),
])
return keymap
@ -4396,9 +4396,9 @@ def km_sculpt(params):
("sculpt.mask_expand", {"type": 'W', "value": 'PRESS', "shift": True},
{"properties": [("use_normals", False), ("keep_previous_mask", False), ("invert", False), ("smooth_iterations", 0), ("create_face_set", True)]}),
("sculpt.face_set_edit", {"type": 'W', "value": 'PRESS', "ctrl": True},
{"properties": [("mode", "GROW")]}),
{"properties": [("mode", 'GROW')]}),
("sculpt.face_set_edit", {"type": 'W', "value": 'PRESS', "ctrl": True, "alt": True},
{"properties": [("mode", "SHRINK")]}),
{"properties": [("mode", 'SHRINK')]}),
# Subdivision levels
*_template_items_object_subdivision_set(),
("object.subdivision_set", {"type": 'PAGE_UP', "value": 'PRESS', "repeat": True},

View File

@ -494,9 +494,9 @@ def km_outliner(params):
{"properties": [("extend", True), ("extend_range", True), ("deselect_all", True)]}),
("outliner.select_box", {"type": 'EVT_TWEAK_L', "value": 'ANY'}, {"properties": [("tweak", True)]}),
("outliner.select_box", {"type": 'EVT_TWEAK_L', "value": 'ANY', "shift": True},
{"properties": [("tweak", True), ("mode", "ADD")]}),
{"properties": [("tweak", True), ("mode", 'ADD')]}),
("outliner.select_box", {"type": 'EVT_TWEAK_L', "value": 'ANY', "ctrl": True},
{"properties": [("tweak", True), ("mode", "SUB")]}),
{"properties": [("tweak", True), ("mode", 'SUB')]}),
("outliner.select_walk", {"type": 'UP_ARROW', "value": 'PRESS', "repeat": True},
{"properties": [("direction", 'UP')]}),
("outliner.select_walk", {"type": 'UP_ARROW', "value": 'PRESS', "shift": True, "repeat": True},
@ -586,7 +586,7 @@ def km_uv_editor(params):
("uv.select", {"type": 'LEFTMOUSE', "value": 'CLICK', "shift": True},
{"properties": [("extend", True), ("deselect_all", False)]}),
("transform.translate", {"type": "EVT_TWEAK_L", "value": 'ANY'}, None),
("transform.translate", {"type": 'EVT_TWEAK_L', "value": 'ANY'}, None),
("uv.select_loop", {"type": 'LEFTMOUSE', "value": 'DOUBLE_CLICK', "shift": True},
{"properties": [("extend", True)]}),
("uv.select_loop", {"type": 'LEFTMOUSE', "value": 'DOUBLE_CLICK'},

View File

@ -225,7 +225,7 @@ class ConstraintButtonsPanel(Panel):
sub.active = con.use_limit_x
sub.prop(con, "min_x", text="Min")
sub.prop(con, "max_x", text="Max")
row.label(icon="BLANK1")
row.label(icon='BLANK1')
row = layout.row(heading="Y", align=True)
row.use_property_decorate = False
@ -234,7 +234,7 @@ class ConstraintButtonsPanel(Panel):
sub.active = con.use_limit_y
sub.prop(con, "min_y", text="Min")
sub.prop(con, "max_y", text="Max")
row.label(icon="BLANK1")
row.label(icon='BLANK1')
row = layout.row(heading="Z", align=True)
row.use_property_decorate = False
@ -243,7 +243,7 @@ class ConstraintButtonsPanel(Panel):
sub.active = con.use_limit_z
sub.prop(con, "min_z", text="Min")
sub.prop(con, "max_z", text="Max")
row.label(icon="BLANK1")
row.label(icon='BLANK1')
layout.prop(con, "use_transform_limit")
self.space_template(layout, con, target=False, owner=True)
@ -556,7 +556,7 @@ class ConstraintButtonsPanel(Panel):
row = layout.row()
row.prop(con, "distance")
row.operator("constraint.limitdistance_reset", text="", icon="X")
row.operator("constraint.limitdistance_reset", text="", icon='X')
layout.prop(con, "limit_mode", text="Clamp Region")
@ -576,7 +576,7 @@ class ConstraintButtonsPanel(Panel):
row = layout.row()
row.prop(con, "rest_length")
row.operator("constraint.stretchto_reset", text="", icon="X")
row.operator("constraint.stretchto_reset", text="", icon='X')
layout.separator()

View File

@ -92,7 +92,7 @@ class PHYSICS_PT_add(PhysicButtonsPanel, Panel):
if obj.type == 'MESH':
row = physics_add(col, context.collision, "Collision", 'COLLISION', 'MOD_PHYSICS', False)
if row and obj.collision:
row.prop(obj.collision, "use", text="", icon="HIDE_OFF" if obj.collision.use else "HIDE_ON")
row.prop(obj.collision, "use", text="", icon='HIDE_OFF' if obj.collision.use else 'HIDE_ON')
physics_add(col, context.cloth, "Cloth", 'CLOTH', 'MOD_CLOTH', True)
physics_add(col, context.dynamic_paint, "Dynamic Paint", 'DYNAMIC_PAINT', 'MOD_DYNAMICPAINT', True)

View File

@ -40,7 +40,7 @@ class FILEBROWSER_HT_header(Header):
row.prop(params, "asset_library", text="")
# External libraries don't auto-refresh, add refresh button.
if params.asset_library != 'LOCAL':
row.operator("file.refresh", text="", icon="FILE_REFRESH")
row.operator("file.refresh", text="", icon='FILE_REFRESH')
layout.separator_spacer()

View File

@ -375,11 +375,11 @@ class OUTLINER_PT_filter(Panel):
row.label(icon='OBJECT_DATAMODE')
row.prop(space, "use_filter_object", text="Objects")
row = col.row(align=True)
row.label(icon="BLANK1")
row.label(icon='BLANK1')
row.prop(space, "filter_state", text="")
sub = row.row(align=True)
sub.enabled = space.filter_state != 'ALL'
sub.prop(space, "filter_invert", text="", icon="ARROW_LEFTRIGHT")
sub.prop(space, "filter_invert", text="", icon='ARROW_LEFTRIGHT')
sub = col.column(align=True)
sub.active = space.use_filter_object