diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-12-18 07:01:03 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-12-18 07:02:49 +0300 |
commit | afc4cd1e678b2e0717115d03910af58456f4a038 (patch) | |
tree | d8e2335d92af1e8a5f8095aa17524bd755cbad99 /release/scripts | |
parent | 7721886eadffc3eb07ac2d8c19cf5f4d12cb3f1c (diff) |
Cleanup: python quotes
Diffstat (limited to 'release/scripts')
6 files changed, 24 insertions, 24 deletions
diff --git a/release/scripts/startup/bl_operators/add_mesh_torus.py b/release/scripts/startup/bl_operators/add_mesh_torus.py index c4fd60140b5..7d30b4e9ce0 100644 --- a/release/scripts/startup/bl_operators/add_mesh_torus.py +++ b/release/scripts/startup/bl_operators/add_mesh_torus.py @@ -200,9 +200,9 @@ class AddTorus(Operator, object_utils.AddObjectHelper): layout = self.layout col = layout.column(align=True) - col.prop(self, 'generate_uvs') + col.prop(self, "generate_uvs") col.separator() - col.prop(self, 'view_align') + col.prop(self, "view_align") col = layout.column(align=True) col.label(text="Location") diff --git a/release/scripts/startup/bl_operators/file.py b/release/scripts/startup/bl_operators/file.py index 44948879fe6..c00c4214ebc 100644 --- a/release/scripts/startup/bl_operators/file.py +++ b/release/scripts/startup/bl_operators/file.py @@ -264,12 +264,12 @@ class WM_OT_blend_strings_utf8_validate(Operator): return False done_items.add(item) - if getattr(item, 'library', None) is not None: + if getattr(item, "library", None) is not None: return False # No point in checking library data, we cannot fix it anyway... changed = False for prop in item.bl_rna.properties: - if prop.identifier in {'bl_rna', 'rna_type'}: + if prop.identifier in {"bl_rna", "rna_type"}: continue # Or we'd recurse 'till Hell freezes. if prop.is_readonly: continue diff --git a/release/scripts/startup/bl_ui/properties_constraint.py b/release/scripts/startup/bl_ui/properties_constraint.py index b1f2c43c933..144e1dc2af6 100644 --- a/release/scripts/startup/bl_ui/properties_constraint.py +++ b/release/scripts/startup/bl_ui/properties_constraint.py @@ -749,7 +749,7 @@ class ConstraintButtonsPanel: layout.prop(con, "shrinkwrap_type") if con.shrinkwrap_type in {'PROJECT', 'NEAREST_SURFACE', 'TARGET_PROJECT'}: - layout.prop(con, 'wrap_mode', text="Snap Mode") + layout.prop(con, "wrap_mode", text="Snap Mode") if con.shrinkwrap_type == 'PROJECT': row = layout.row(align=True) diff --git a/release/scripts/startup/bl_ui/properties_texture.py b/release/scripts/startup/bl_ui/properties_texture.py index 10983d1faaa..425681fc19a 100644 --- a/release/scripts/startup/bl_ui/properties_texture.py +++ b/release/scripts/startup/bl_ui/properties_texture.py @@ -177,7 +177,7 @@ class TEXTURE_PT_node_mapping(TextureButtonsPanel, Panel): def poll(cls, context): node = context.texture_node # TODO(sergey): perform a faster/nicer check? - return node and hasattr(node, 'texture_mapping') and (context.engine in cls.COMPAT_ENGINES) + return node and hasattr(node, "texture_mapping") and (context.engine in cls.COMPAT_ENGINES) def draw(self, context): layout = self.layout diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index efbccc33c1b..88bfa8a2e24 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -45,9 +45,9 @@ class USERPREF_HT_header(Header): layout.operator("wm.addon_refresh", icon='FILE_REFRESH') layout.menu("USERPREF_MT_addons_online_resources") elif userpref.active_section == 'LIGHTS': - layout.operator('wm.studiolight_install', text="Add MatCap").type = 'MATCAP' - layout.operator('wm.studiolight_install', text="Add LookDev HDRI").type = 'WORLD' - op = layout.operator('wm.studiolight_install', text="Add Studio Light") + layout.operator("wm.studiolight_install", text="Add MatCap").type = 'MATCAP' + layout.operator("wm.studiolight_install", text="Add LookDev HDRI").type = 'WORLD' + op = layout.operator("wm.studiolight_install", text="Add Studio Light") op.type = 'STUDIO' op.filter_glob = ".sl" elif userpref.active_section == 'THEMES': @@ -1521,11 +1521,11 @@ class StudioLightPanelMixin(): row.template_icon(layout.icon(studio_light), scale=6.0) col = row.column() - op = col.operator('wm.studiolight_uninstall', text="", icon='REMOVE') + op = col.operator("wm.studiolight_uninstall", text="", icon='REMOVE') op.index = studio_light.index if studio_light.type == 'STUDIO': - op = col.operator('wm.studiolight_copy_settings', text="", icon='IMPORT') + op = col.operator("wm.studiolight_copy_settings", text="", icon='IMPORT') op.index = studio_light.index box.label(text=studio_light.name) @@ -1571,7 +1571,7 @@ class USERPREF_PT_studiolight_light_editor(Panel): row = layout.row() row.prop(system, "edit_studio_light", toggle=True) - row.operator('wm.studiolight_new', text="Save as Studio light", icon="FILE_TICK") + row.operator("wm.studiolight_new", text="Save as Studio light", icon="FILE_TICK") layout.separator() diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index bfba36f255b..de1502375cf 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -161,7 +161,7 @@ class VIEW3D_HT_header(Header): show_snap = True if show_snap: - snap_items = bpy.types.ToolSettings.bl_rna.properties['snap_elements'].enum_items + snap_items = bpy.types.ToolSettings.bl_rna.properties["snap_elements"].enum_items snap_elements = tool_settings.snap_elements if len(snap_elements) == 1: text = "" @@ -229,7 +229,7 @@ class VIEW3D_HT_header(Header): # grease pencil if object_mode == 'PAINT_GPENCIL': origin = tool_settings.gpencil_stroke_placement_view3d - gp_origin = tool_settings.bl_rna.properties['gpencil_stroke_placement_view3d'].enum_items[origin] + gp_origin = tool_settings.bl_rna.properties["gpencil_stroke_placement_view3d"].enum_items[origin] or_icon = getattr(gp_origin, "icon", "BLANK1") or_name = getattr(gp_origin, "name", "Stroke Placement") @@ -4024,7 +4024,7 @@ class VIEW3D_MT_object_mode_pie(Menu): layout = self.layout pie = layout.menu_pie() - pie.operator_enum("OBJECT_OT_mode_set", "mode") + pie.operator_enum("object.mode_set", "mode") class VIEW3D_MT_view_pie(Menu): @@ -4035,7 +4035,7 @@ class VIEW3D_MT_view_pie(Menu): layout = self.layout pie = layout.menu_pie() - pie.operator_enum("VIEW3D_OT_view_axis", "type") + pie.operator_enum("view3d.view_axis", "type") pie.operator("view3d.view_camera", text="View Camera", icon='CAMERA_DATA') pie.operator("view3d.view_selected", text="View Selected", icon='ZOOM_SELECTED') @@ -4067,7 +4067,7 @@ class VIEW3D_MT_shading_ex_pie(Menu): pie.prop_enum(view.shading, "type", value='WIREFRAME') pie.prop_enum(view.shading, "type", value='SOLID') - # Note this duplicates 'view3d.toggle_xray' logic, so we can see the active item: T58661. + # Note this duplicates "view3d.toggle_xray" logic, so we can see the active item: T58661. if ( (context.mode == 'POSE') or ((context.mode == 'WEIGHT_PAINT') and (context.active_object.find_armature())) @@ -4422,7 +4422,7 @@ class VIEW3D_PT_shading_lighting(Panel): sub.prop(system, "edit_studio_light", text="Disable Studio Light Edit", icon="NONE", toggle=True) col = split.column() - col.operator('wm.studiolight_userpref_show', emboss=False, text="", icon='PREFERENCES') + col.operator("wm.studiolight_userpref_show", emboss=False, text="", icon='PREFERENCES') split = layout.split(factor=0.9) col = split.column() @@ -4440,8 +4440,8 @@ class VIEW3D_PT_shading_lighting(Panel): sub.template_icon_view(shading, "studio_light", scale=3) col = split.column() - col.operator('wm.studiolight_userpref_show', emboss=False, text="", icon='PREFERENCES') - col.operator('VIEW3D_OT_toggle_matcap_flip', emboss=False, text="", icon='ARROW_LEFTRIGHT') + col.operator("wm.studiolight_userpref_show", emboss=False, text="", icon='PREFERENCES') + col.operator("view3d.toggle_matcap_flip", emboss=False, text="", icon='ARROW_LEFTRIGHT') elif shading.type == 'MATERIAL': col.prop(shading, "use_scene_lights") @@ -4457,7 +4457,7 @@ class VIEW3D_PT_shading_lighting(Panel): sub.template_icon_view(shading, "studio_light", scale=3) col = split.column() - col.operator('wm.studiolight_userpref_show', emboss=False, text="", icon='PREFERENCES') + col.operator("wm.studiolight_userpref_show", emboss=False, text="", icon='PREFERENCES') if shading.selected_studio_light.type == 'WORLD': split = layout.split(factor=0.9) @@ -4482,16 +4482,16 @@ class VIEW3D_PT_shading_color(Panel): layout = self.layout shading = VIEW3D_PT_shading.get_shading(context) - layout.row().prop(shading, 'color_type', expand=True) + layout.row().prop(shading, "color_type", expand=True) if shading.color_type == 'SINGLE': - layout.row().prop(shading, 'single_color', text="") + layout.row().prop(shading, "single_color", text="") def _draw_background_color(self, context): layout = self.layout shading = VIEW3D_PT_shading.get_shading(context) layout.row().label(text="Background") - layout.row().prop(shading, 'background_type', expand=True) + layout.row().prop(shading, "background_type", expand=True) if shading.background_type == 'VIEWPORT': layout.row().prop(shading, "background_color", text="") |