From 706b13959e18c75722bbbb3d29e6aa22137adb2a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 6 Jan 2023 13:52:57 +1100 Subject: [PATCH] Cleanup: use double-quotes for non-enum strings --- .../scripts/startup/bl_operators/assets.py | 4 +- release/scripts/startup/bl_operators/clip.py | 2 +- .../scripts/startup/bl_operators/freestyle.py | 4 +- .../scripts/startup/bl_operators/sequencer.py | 2 +- release/scripts/startup/bl_operators/wm.py | 2 +- .../startup/bl_ui/properties_animviz.py | 2 +- .../startup/bl_ui/properties_constraint.py | 2 +- .../startup/bl_ui/properties_data_bone.py | 8 +- .../startup/bl_ui/properties_data_curves.py | 10 +-- .../startup/bl_ui/properties_data_mesh.py | 4 +- .../bl_ui/properties_data_pointcloud.py | 12 +-- .../startup/bl_ui/properties_data_volume.py | 2 +- .../startup/bl_ui/properties_output.py | 2 +- .../scripts/startup/bl_ui/space_console.py | 6 +- .../scripts/startup/bl_ui/space_dopesheet.py | 2 +- release/scripts/startup/bl_ui/space_image.py | 2 +- release/scripts/startup/bl_ui/space_node.py | 6 +- .../startup/bl_ui/space_toolsystem_common.py | 10 +-- .../startup/bl_ui/space_toolsystem_toolbar.py | 6 +- .../scripts/startup/bl_ui/space_userpref.py | 2 +- release/scripts/startup/bl_ui/space_view3d.py | 90 +++++++++---------- .../startup/bl_ui/space_view3d_toolbar.py | 2 +- .../scripts/startup/keyingsets_builtins.py | 4 +- 23 files changed, 93 insertions(+), 93 deletions(-) diff --git a/release/scripts/startup/bl_operators/assets.py b/release/scripts/startup/bl_operators/assets.py index b794ede10a2..793ac166d06 100644 --- a/release/scripts/startup/bl_operators/assets.py +++ b/release/scripts/startup/bl_operators/assets.py @@ -81,8 +81,8 @@ class ASSET_OT_open_containing_blend_file(Operator): @classmethod def poll(cls, context): - asset_file_handle = getattr(context, 'asset_file_handle', None) - asset_library_ref = getattr(context, 'asset_library_ref', None) + asset_file_handle = getattr(context, "asset_file_handle", None) + asset_library_ref = getattr(context, "asset_library_ref", None) if not asset_library_ref: cls.poll_message_set("No asset library selected") diff --git a/release/scripts/startup/bl_operators/clip.py b/release/scripts/startup/bl_operators/clip.py index 4bdf20d207c..c38c8a57da0 100644 --- a/release/scripts/startup/bl_operators/clip.py +++ b/release/scripts/startup/bl_operators/clip.py @@ -620,7 +620,7 @@ class CLIP_OT_setup_tracking_scene(Operator): if not view_layers.get("Foreground"): if len(view_layers) == 1: fg = view_layers[0] - fg.name = 'Foreground' + fg.name = "Foreground" else: fg = view_layers.new("Foreground") diff --git a/release/scripts/startup/bl_operators/freestyle.py b/release/scripts/startup/bl_operators/freestyle.py index 02b784357b0..80520450786 100644 --- a/release/scripts/startup/bl_operators/freestyle.py +++ b/release/scripts/startup/bl_operators/freestyle.py @@ -142,7 +142,7 @@ class SCENE_OT_freestyle_add_edge_marks_to_keying_set(Operator): bpy.ops.object.mode_set(mode='OBJECT', toggle=False) for i, edge in enumerate(mesh.edges): if not edge.hide and edge.select: - path = 'edges[%d].use_freestyle_mark' % i + path = "edges[%d].use_freestyle_mark" % i ks.paths.add(mesh, path, index=0) bpy.ops.object.mode_set(mode=ob_mode, toggle=False) return {'FINISHED'} @@ -173,7 +173,7 @@ class SCENE_OT_freestyle_add_face_marks_to_keying_set(Operator): bpy.ops.object.mode_set(mode='OBJECT', toggle=False) for i, polygon in enumerate(mesh.polygons): if not polygon.hide and polygon.select: - path = 'polygons[%d].use_freestyle_mark' % i + path = "polygons[%d].use_freestyle_mark" % i ks.paths.add(mesh, path, index=0) bpy.ops.object.mode_set(mode=ob_mode, toggle=False) return {'FINISHED'} diff --git a/release/scripts/startup/bl_operators/sequencer.py b/release/scripts/startup/bl_operators/sequencer.py index a002e53d2ee..45a526272d6 100644 --- a/release/scripts/startup/bl_operators/sequencer.py +++ b/release/scripts/startup/bl_operators/sequencer.py @@ -223,7 +223,7 @@ class SequencerFadesAdd(Operator): if not self.is_long_enough(sequence, duration): continue - animated_property = 'volume' if hasattr(sequence, 'volume') else 'blend_alpha' + animated_property = "volume" if hasattr(sequence, "volume") else "blend_alpha" fade_fcurve = self.fade_find_or_create_fcurve(context, sequence, animated_property) fades = self.calculate_fades(sequence, fade_fcurve, animated_property, duration) self.fade_animation_clear(fade_fcurve, fades) diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py index bdb679eba07..39789cba0c4 100644 --- a/release/scripts/startup/bl_operators/wm.py +++ b/release/scripts/startup/bl_operators/wm.py @@ -2507,7 +2507,7 @@ class WM_OT_batch_rename(Operator): ('COLLECTION', "Collections", ""), ('MATERIAL', "Materials", ""), None, - # Enum identifiers are compared with 'object.type'. + # Enum identifiers are compared with `object.type`. # Follow order in "Add" menu. ('MESH', "Meshes", ""), ('CURVE', "Curves", ""), diff --git a/release/scripts/startup/bl_ui/properties_animviz.py b/release/scripts/startup/bl_ui/properties_animviz.py index 655f80b9c7c..df6d6e63ee8 100644 --- a/release/scripts/startup/bl_ui/properties_animviz.py +++ b/release/scripts/startup/bl_ui/properties_animviz.py @@ -66,7 +66,7 @@ class MotionPathButtonsPanel: col.operator(op_category + ".paths_calculate", text="Calculate...", icon=icon) # Update All & Clear All. - # Note that 'col' is from inside the preceeding `if` or `else` block. + # Note that `col` is from inside the preceding `if` or `else` block. row = col.row(align=True) row.operator("object.paths_update_visible", text="Update All Paths", icon='WORLD') row.operator(op_category + ".paths_clear", text="", icon='X').only_selected = False diff --git a/release/scripts/startup/bl_ui/properties_constraint.py b/release/scripts/startup/bl_ui/properties_constraint.py index d949ee779e1..38e5f5719d4 100644 --- a/release/scripts/startup/bl_ui/properties_constraint.py +++ b/release/scripts/startup/bl_ui/properties_constraint.py @@ -87,7 +87,7 @@ class ConstraintButtonsPanel: @staticmethod def target_template(layout, con, subtargets=True): col = layout.column() - col.prop(con, "target") # XXX limiting settings for only 'curves' or some type of object + col.prop(con, "target") # XXX: limiting settings for only `curves` or some type of object. if con.target and subtargets: if con.target.type == 'ARMATURE': diff --git a/release/scripts/startup/bl_ui/properties_data_bone.py b/release/scripts/startup/bl_ui/properties_data_bone.py index 8e1808949b3..14f6da83be2 100644 --- a/release/scripts/startup/bl_ui/properties_data_bone.py +++ b/release/scripts/startup/bl_ui/properties_data_bone.py @@ -87,7 +87,7 @@ class BONE_PT_transform(BoneButtonsPanel, Panel): row.use_property_decorate = False row.prop(pchan, "lock_rotation", text="", emboss=False, icon='DECORATE_UNLOCKED') row = layout.row(align=True) - row.prop(pchan, "rotation_mode", text='Mode') + row.prop(pchan, "rotation_mode", text="Mode") row.label(text="", icon='BLANK1') col = layout.column() @@ -403,9 +403,9 @@ class BONE_PT_inverse_kinematics(BoneButtonsPanel, Panel): col.prop(pchan, "ik_rotation_weight", text="IK Rotation Weight", slider=True) col.active = active # not supported yet - #row = layout.row() - #row.prop(pchan, "use_ik_linear_control", text="Joint Size") - #row.prop(pchan, "ik_linear_weight", text="Weight", slider=True) + # row = layout.row() + # row.prop(pchan, "use_ik_linear_control", text="Joint Size") + # row.prop(pchan, "ik_linear_weight", text="Weight", slider=True) class BONE_PT_deform(BoneButtonsPanel, Panel): diff --git a/release/scripts/startup/bl_ui/properties_data_curves.py b/release/scripts/startup/bl_ui/properties_data_curves.py index 1a353d8d9d5..e17d749acd5 100644 --- a/release/scripts/startup/bl_ui/properties_data_curves.py +++ b/release/scripts/startup/bl_ui/properties_data_curves.py @@ -12,7 +12,7 @@ class DataButtonsPanel: @classmethod def poll(cls, context): engine = context.scene.render.engine - return hasattr(context, 'curves') and context.curves and (engine in cls.COMPAT_ENGINES) + return hasattr(context, "curves") and context.curves and (engine in cls.COMPAT_ENGINES) class DATA_PT_context_curves(DataButtonsPanel, Panel): @@ -73,8 +73,8 @@ class CURVES_MT_add_attribute(Menu): layout = self.layout curves = context.curves - self.add_standard_attribute(layout, curves, 'radius', 'FLOAT', 'POINT') - self.add_standard_attribute(layout, curves, 'color', 'FLOAT_COLOR', 'POINT') + self.add_standard_attribute(layout, curves, "radius", 'FLOAT', 'POINT') + self.add_standard_attribute(layout, curves, "color", 'FLOAT_COLOR', 'POINT') layout.separator() @@ -102,8 +102,8 @@ class CURVES_UL_attributes(UIList): return flags, indices def draw_item(self, _context, layout, _data, attribute, _icon, _active_data, _active_propname, _index): - data_type = attribute.bl_rna.properties['data_type'].enum_items[attribute.data_type] - domain = attribute.bl_rna.properties['domain'].enum_items[attribute.domain] + data_type = attribute.bl_rna.properties["data_type"].enum_items[attribute.data_type] + domain = attribute.bl_rna.properties["domain"].enum_items[attribute.domain] split = layout.split(factor=0.5) split.emboss = 'NONE' diff --git a/release/scripts/startup/bl_ui/properties_data_mesh.py b/release/scripts/startup/bl_ui/properties_data_mesh.py index e390b9cb6d4..bf85c4ac533 100644 --- a/release/scripts/startup/bl_ui/properties_data_mesh.py +++ b/release/scripts/startup/bl_ui/properties_data_mesh.py @@ -551,7 +551,7 @@ class MESH_UL_attributes(UIList): return flags, indices def draw_item(self, _context, layout, _data, attribute, _icon, _active_data, _active_propname, _index): - data_type = attribute.bl_rna.properties['data_type'].enum_items[attribute.data_type] + data_type = attribute.bl_rna.properties["data_type"].enum_items[attribute.data_type] domain_name = self.display_domain_names.get(attribute.domain, "") @@ -658,7 +658,7 @@ class ColorAttributesListBase(): class MESH_UL_color_attributes(UIList, ColorAttributesListBase): def draw_item(self, _context, layout, data, attribute, _icon, _active_data, _active_propname, _index): - data_type = attribute.bl_rna.properties['data_type'].enum_items[attribute.data_type] + data_type = attribute.bl_rna.properties["data_type"].enum_items[attribute.data_type] domain_name = self.display_domain_names.get(attribute.domain, "") diff --git a/release/scripts/startup/bl_ui/properties_data_pointcloud.py b/release/scripts/startup/bl_ui/properties_data_pointcloud.py index 09639e9d69b..db1b83f0cf4 100644 --- a/release/scripts/startup/bl_ui/properties_data_pointcloud.py +++ b/release/scripts/startup/bl_ui/properties_data_pointcloud.py @@ -12,7 +12,7 @@ class DataButtonsPanel: @classmethod def poll(cls, context): engine = context.scene.render.engine - return hasattr(context, 'pointcloud') and context.pointcloud and (engine in cls.COMPAT_ENGINES) + return hasattr(context, "pointcloud") and context.pointcloud and (engine in cls.COMPAT_ENGINES) class DATA_PT_context_pointcloud(DataButtonsPanel, Panel): @@ -53,10 +53,10 @@ class POINTCLOUD_MT_add_attribute(Menu): layout = self.layout pointcloud = context.pointcloud - self.add_standard_attribute(layout, pointcloud, 'radius', 'FLOAT', 'POINT') - self.add_standard_attribute(layout, pointcloud, 'color', 'FLOAT_COLOR', 'POINT') - self.add_standard_attribute(layout, pointcloud, 'id', 'INT', 'POINT') - self.add_standard_attribute(layout, pointcloud, 'velocity', 'FLOAT_VECTOR', 'POINT') + self.add_standard_attribute(layout, pointcloud, "radius", 'FLOAT', 'POINT') + self.add_standard_attribute(layout, pointcloud, "color", 'FLOAT_COLOR', 'POINT') + self.add_standard_attribute(layout, pointcloud, "id", 'INT', 'POINT') + self.add_standard_attribute(layout, pointcloud, "velocity", 'FLOAT_VECTOR', 'POINT') layout.separator() @@ -84,7 +84,7 @@ class POINTCLOUD_UL_attributes(UIList): return flags, indices def draw_item(self, _context, layout, _data, attribute, _icon, _active_data, _active_propname, _index): - data_type = attribute.bl_rna.properties['data_type'].enum_items[attribute.data_type] + data_type = attribute.bl_rna.properties["data_type"].enum_items[attribute.data_type] split = layout.split(factor=0.75) split.emboss = 'NONE' diff --git a/release/scripts/startup/bl_ui/properties_data_volume.py b/release/scripts/startup/bl_ui/properties_data_volume.py index 1aa2faad7b8..148bb60de85 100644 --- a/release/scripts/startup/bl_ui/properties_data_volume.py +++ b/release/scripts/startup/bl_ui/properties_data_volume.py @@ -68,7 +68,7 @@ class DATA_PT_volume_file(DataButtonsPanel, Panel): class VOLUME_UL_grids(UIList): def draw_item(self, _context, layout, _data, grid, _icon, _active_data, _active_propname, _index): name = grid.name - data_type = grid.bl_rna.properties['data_type'].enum_items[grid.data_type] + data_type = grid.bl_rna.properties["data_type"].enum_items[grid.data_type] layout.emboss = 'NONE' layout.label(text=name) diff --git a/release/scripts/startup/bl_ui/properties_output.py b/release/scripts/startup/bl_ui/properties_output.py index c97d7579a81..00c81d0dc87 100644 --- a/release/scripts/startup/bl_ui/properties_output.py +++ b/release/scripts/startup/bl_ui/properties_output.py @@ -324,7 +324,7 @@ class RENDER_PT_output_color_management(RenderOutputButtonsPanel, Panel): col = flow.column() if image_settings.has_linear_colorspace: - if hasattr(owner, 'linear_colorspace_settings'): + if hasattr(owner, "linear_colorspace_settings"): col.prop(owner.linear_colorspace_settings, "name", text="Color Space") else: col.prop(owner.display_settings, "display_device") diff --git a/release/scripts/startup/bl_ui/space_console.py b/release/scripts/startup/bl_ui/space_console.py index e9d1fc516ae..4f8e740d680 100644 --- a/release/scripts/startup/bl_ui/space_console.py +++ b/release/scripts/startup/bl_ui/space_console.py @@ -31,10 +31,10 @@ class CONSOLE_MT_view(Menu): layout = self.layout props = layout.operator("wm.context_cycle_int", text="Zoom In") - props.data_path = 'space_data.font_size' + props.data_path = "space_data.font_size" props.reverse = False props = layout.operator("wm.context_cycle_int", text="Zoom Out") - props.data_path = 'space_data.font_size' + props.data_path = "space_data.font_size" props.reverse = True layout.separator() @@ -62,7 +62,7 @@ class CONSOLE_MT_language(Menu): layout = self.layout layout.column() - # Collect modules with 'console_*.execute' + # Collect modules with `console_*.execute`. languages = [] for modname, mod in sys.modules.items(): if modname.startswith("console_") and hasattr(mod, "execute"): diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py index 1913c809ec5..99b33840051 100644 --- a/release/scripts/startup/bl_ui/space_dopesheet.py +++ b/release/scripts/startup/bl_ui/space_dopesheet.py @@ -550,7 +550,7 @@ class DOPESHEET_PT_custom_props_action(PropertyPanel, Panel): bl_space_type = 'DOPESHEET_EDITOR' bl_category = "Action" bl_region_type = 'UI' - bl_context = 'data' + bl_context = "data" _context_path = "active_action" _property_type = bpy.types.Action diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index 84aeacea03c..d0f17c582d5 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -742,7 +742,7 @@ class IMAGE_HT_header(Header): # Snap. snap_uv_element = tool_settings.snap_uv_element - act_snap_uv_element = tool_settings.bl_rna.properties['snap_uv_element'].enum_items[snap_uv_element] + act_snap_uv_element = tool_settings.bl_rna.properties["snap_uv_element"].enum_items[snap_uv_element] row = layout.row(align=True) row.prop(tool_settings, "use_snap_uv", text="") diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py index 010dbf5b099..bf8a39ea26f 100644 --- a/release/scripts/startup/bl_ui/space_node.py +++ b/release/scripts/startup/bl_ui/space_node.py @@ -41,7 +41,7 @@ class NODE_HT_header(Header): layout.template_header() - # Now expanded via the 'ui_type' + # Now expanded via the `ui_type`. # layout.prop(snode, "tree_type", text="") if snode.tree_type == 'ShaderNodeTree': @@ -661,7 +661,7 @@ class NODE_PT_active_node_properties(Panel): ) def show_socket_input(self, socket): - return hasattr(socket, 'draw') and socket.enabled and not socket.is_linked + return hasattr(socket, "draw") and socket.enabled and not socket.is_linked class NODE_PT_texture_mapping(Panel): @@ -961,7 +961,7 @@ def node_panel(cls): node_cls.bl_space_type = 'NODE_EDITOR' node_cls.bl_region_type = 'UI' node_cls.bl_category = "Options" - if hasattr(node_cls, 'bl_parent_id'): + if hasattr(node_cls, "bl_parent_id"): node_cls.bl_parent_id = 'NODE_' + node_cls.bl_parent_id return node_cls diff --git a/release/scripts/startup/bl_ui/space_toolsystem_common.py b/release/scripts/startup/bl_ui/space_toolsystem_common.py index ddffbc2b827..1f950ce1611 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_common.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_common.py @@ -51,8 +51,8 @@ ToolDef = namedtuple( "idname", # The name to display in the interface. "label", - # Description (for tool-tip), when not set, use the description of 'operator', - # may be a string or a 'function(context, item, key-map) -> string'. + # Description (for tool-tip), when not set, use the description of `operator`, + # may be a string or a `function(context, item, key-map) -> string`. "description", # The name of the icon to use (found in `release/datafiles/icons`) or None for no icon. "icon", @@ -88,7 +88,7 @@ ToolDef = namedtuple( # Note that this isn't used for Blender's built in tools which use the built-in key-map. # Keep this functionality since it's likely useful for add-on key-maps. # - # Warning: currently 'from_dict' this is a list of one item, + # Warning: currently `from_dict` this is a list of one item, # so internally we can swap the key-map function for the key-map itself. # This isn't very nice and may change, tool definitions shouldn't care about this. "keymap", @@ -256,7 +256,7 @@ class ToolSelectPanelHelper: # tool flattening # - # usually 'tools' is already expanded into ToolDef + # usually 'tools' is already expanded into `ToolDef` # but when registering a tool, this can still be a function # (_tools_flatten is usually called with cls.tools_from_context(context) # [that already yields from the function]) @@ -792,7 +792,7 @@ class ToolSelectPanelHelper: item, tool, icon_value = cls._tool_get_active(context, space_type, mode, with_icon=True) if item is None: return None - # Note: we could show 'item.text' here but it makes the layout jitter when switching tools. + # NOTE: we could show `item.text` here but it makes the layout jitter when switching tools. # Add some spacing since the icon is currently assuming regular small icon size. if show_tool_icon_always: layout.label(text=" " + iface_(item.label, "Operator"), icon_value=icon_value) diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index c18c2fe4b01..fb6136154c8 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -2706,7 +2706,7 @@ class IMAGE_PT_tools_active(ToolSelectPanelHelper, Panel): ) # Private tools dictionary, store data to implement `tools_all` & `tools_from_context`. - # The keys match image spaces modes: 'context.space_data.mode'. + # The keys match image spaces modes: `context.space_data.mode`. # The values represent the tools, see `ToolSelectPanelHelper` for details. _tools = { None: [ @@ -2892,7 +2892,7 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel): ) # Private tools dictionary, store data to implement `tools_all` & `tools_from_context`. - # The keys match object-modes from: 'context.mode'. + # The keys match object-modes from: `context.mode`. # The values represent the tools, see `ToolSelectPanelHelper` for details. _tools = { None: [ @@ -3230,7 +3230,7 @@ class SEQUENCER_PT_tools_active(ToolSelectPanelHelper, Panel): ) # Private tools dictionary, store data to implement `tools_all` & `tools_from_context`. - # The keys match sequence editors view type: 'context.space_data.view_type'. + # The keys match sequence editors view type: `context.space_data.view_type`. # The values represent the tools, see `ToolSelectPanelHelper` for details. _tools = { None: [ diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 44bc807c7dd..49b07739e93 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -1286,7 +1286,7 @@ class ThemeGenericClassGenerator: def generate_panel_classes_from_theme_areas(): from bpy.types import Theme - for theme_area in Theme.bl_rna.properties['theme_area'].enum_items_static: + for theme_area in Theme.bl_rna.properties["theme_area"].enum_items_static: if theme_area.identifier in {'USER_INTERFACE', 'STYLE', 'BONE_COLOR_SETS'}: continue diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 3e0dafac887..791e7233b49 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -70,7 +70,7 @@ class VIEW3D_HT_tool_header(Header): layout.popover("VIEW3D_PT_tools_brush_falloff") layout.popover("VIEW3D_PT_tools_brush_display") - # Note: general mode options should be added to 'draw_mode_settings'. + # NOTE: general mode options should be added to `draw_mode_settings`. if tool_mode == 'SCULPT': if is_valid_context: draw_3d_brush_settings(layout, tool_mode) @@ -889,7 +889,7 @@ class VIEW3D_HT_header(Header): row = layout.row() row.active = (object_mode == 'EDIT') or (shading.type in {'WIREFRAME', 'SOLID'}) - # While exposing 'shading.show_xray(_wireframe)' is correct. + # While exposing `shading.show_xray(_wireframe)` is correct. # this hides the key shortcut from users: T70433. if has_pose_mode: draw_depressed = overlay.show_xray_bone @@ -2290,9 +2290,9 @@ class VIEW3D_MT_add(Menu): def draw(self, context): layout = self.layout - # note, don't use 'EXEC_SCREEN' or operators won't get the 'v3d' context. + # NOTE: don't use 'EXEC_SCREEN' or operators won't get the `v3d` context. - # Note: was EXEC_AREA, but this context does not have the 'rv3d', which prevents + # NOTE: was `EXEC_AREA`, but this context does not have the `rv3d`, which prevents # "align_view" to work on first call (see T32719). layout.operator_context = 'EXEC_REGION_WIN' @@ -3291,23 +3291,23 @@ class VIEW3D_MT_mask(Menu): layout.separator() - props = layout.operator("sculpt.mask_filter", text='Smooth Mask') + props = layout.operator("sculpt.mask_filter", text="Smooth Mask") props.filter_type = 'SMOOTH' - props = layout.operator("sculpt.mask_filter", text='Sharpen Mask') + props = layout.operator("sculpt.mask_filter", text="Sharpen Mask") props.filter_type = 'SHARPEN' - props = layout.operator("sculpt.mask_filter", text='Grow Mask') + props = layout.operator("sculpt.mask_filter", text="Grow Mask") props.filter_type = 'GROW' - props = layout.operator("sculpt.mask_filter", text='Shrink Mask') + props = layout.operator("sculpt.mask_filter", text="Shrink Mask") props.filter_type = 'SHRINK' - props = layout.operator("sculpt.mask_filter", text='Increase Contrast') + props = layout.operator("sculpt.mask_filter", text="Increase Contrast") props.filter_type = 'CONTRAST_INCREASE' props.auto_iteration_count = False - props = layout.operator("sculpt.mask_filter", text='Decrease Contrast') + props = layout.operator("sculpt.mask_filter", text="Decrease Contrast") props.filter_type = 'CONTRAST_DECREASE' props.auto_iteration_count = False @@ -3352,13 +3352,13 @@ class VIEW3D_MT_face_sets(Menu): def draw(self, _context): layout = self.layout - op = layout.operator("sculpt.face_sets_create", text='Face Set from Masked') + op = layout.operator("sculpt.face_sets_create", text="Face Set from Masked") op.mode = 'MASKED' - op = layout.operator("sculpt.face_sets_create", text='Face Set from Visible') + op = layout.operator("sculpt.face_sets_create", text="Face Set from Visible") op.mode = 'VISIBLE' - op = layout.operator("sculpt.face_sets_create", text='Face Set from Edit Mode Selection') + op = layout.operator("sculpt.face_sets_create", text="Face Set from Edit Mode Selection") op.mode = 'SELECTION' layout.separator() @@ -3367,10 +3367,10 @@ class VIEW3D_MT_face_sets(Menu): layout.separator() - op = layout.operator("sculpt.face_set_edit", text='Grow Face Set') + op = layout.operator("sculpt.face_set_edit", text="Grow Face Set") op.mode = 'GROW' - op = layout.operator("sculpt.face_set_edit", text='Shrink Face Set') + op = layout.operator("sculpt.face_set_edit", text="Shrink Face Set") op.mode = 'SHRINK' layout.separator() @@ -3389,18 +3389,18 @@ class VIEW3D_MT_face_sets(Menu): layout.separator() - op = layout.operator("mesh.face_set_extract", text='Extract Face Set') + op = layout.operator("mesh.face_set_extract", text="Extract Face Set") layout.separator() - op = layout.operator("sculpt.face_set_change_visibility", text='Invert Visible Face Sets') + op = layout.operator("sculpt.face_set_change_visibility", text="Invert Visible Face Sets") op.mode = 'INVERT' - op = layout.operator("sculpt.reveal_all", text='Show All Face Sets') + op = layout.operator("sculpt.reveal_all", text="Show All Face Sets") layout.separator() - op = layout.operator("sculpt.face_sets_randomize_colors", text='Randomize Colors') + op = layout.operator("sculpt.face_sets_randomize_colors", text="Randomize Colors") class VIEW3D_MT_sculpt_set_pivot(Menu): @@ -3431,31 +3431,31 @@ class VIEW3D_MT_face_sets_init(Menu): def draw(self, _context): layout = self.layout - op = layout.operator("sculpt.face_sets_init", text='By Loose Parts') + op = layout.operator("sculpt.face_sets_init", text="By Loose Parts") op.mode = 'LOOSE_PARTS' - op = layout.operator("sculpt.face_sets_init", text='By Face Set Boundaries') + op = layout.operator("sculpt.face_sets_init", text="By Face Set Boundaries") op.mode = 'FACE_SET_BOUNDARIES' - op = layout.operator("sculpt.face_sets_init", text='By Materials') + op = layout.operator("sculpt.face_sets_init", text="By Materials") op.mode = 'MATERIALS' - op = layout.operator("sculpt.face_sets_init", text='By Normals') + op = layout.operator("sculpt.face_sets_init", text="By Normals") op.mode = 'NORMALS' - op = layout.operator("sculpt.face_sets_init", text='By UV Seams') + op = layout.operator("sculpt.face_sets_init", text="By UV Seams") op.mode = 'UV_SEAMS' - op = layout.operator("sculpt.face_sets_init", text='By Edge Creases') + op = layout.operator("sculpt.face_sets_init", text="By Edge Creases") op.mode = 'CREASES' - op = layout.operator("sculpt.face_sets_init", text='By Edge Bevel Weight') + op = layout.operator("sculpt.face_sets_init", text="By Edge Bevel Weight") op.mode = 'BEVEL_WEIGHT' - op = layout.operator("sculpt.face_sets_init", text='By Sharp Edges') + op = layout.operator("sculpt.face_sets_init", text="By Sharp Edges") op.mode = 'SHARP_EDGES' - op = layout.operator("sculpt.face_sets_init", text='By Face Maps') + op = layout.operator("sculpt.face_sets_init", text="By Face Maps") op.mode = 'FACE_MAPS' @@ -3465,13 +3465,13 @@ class VIEW3D_MT_random_mask(Menu): def draw(self, _context): layout = self.layout - op = layout.operator("sculpt.mask_init", text='Per Vertex') + op = layout.operator("sculpt.mask_init", text="Per Vertex") op.mode = 'RANDOM_PER_VERTEX' - op = layout.operator("sculpt.mask_init", text='Per Face Set') + op = layout.operator("sculpt.mask_init", text="Per Face Set") op.mode = 'RANDOM_PER_FACE_SET' - op = layout.operator("sculpt.mask_init", text='Per Loose Part') + op = layout.operator("sculpt.mask_init", text="Per Loose Part") op.mode = 'RANDOM_PER_LOOSE_PART' @@ -5500,23 +5500,23 @@ class VIEW3D_MT_sculpt_mask_edit_pie(Menu): layout = self.layout pie = layout.menu_pie() - op = pie.operator("paint.mask_flood_fill", text='Invert Mask') + op = pie.operator("paint.mask_flood_fill", text="Invert Mask") op.mode = 'INVERT' - op = pie.operator("paint.mask_flood_fill", text='Clear Mask') + op = pie.operator("paint.mask_flood_fill", text="Clear Mask") op.mode = 'VALUE' op.value = 0.0 - op = pie.operator("sculpt.mask_filter", text='Smooth Mask') + op = pie.operator("sculpt.mask_filter", text="Smooth Mask") op.filter_type = 'SMOOTH' - op = pie.operator("sculpt.mask_filter", text='Sharpen Mask') + op = pie.operator("sculpt.mask_filter", text="Sharpen Mask") op.filter_type = 'SHARPEN' - op = pie.operator("sculpt.mask_filter", text='Grow Mask') + op = pie.operator("sculpt.mask_filter", text="Grow Mask") op.filter_type = 'GROW' - op = pie.operator("sculpt.mask_filter", text='Shrink Mask') + op = pie.operator("sculpt.mask_filter", text="Shrink Mask") op.filter_type = 'SHRINK' - op = pie.operator("sculpt.mask_filter", text='Increase Contrast') + op = pie.operator("sculpt.mask_filter", text="Increase Contrast") op.filter_type = 'CONTRAST_INCREASE' op.auto_iteration_count = False - op = pie.operator("sculpt.mask_filter", text='Decrease Contrast') + op = pie.operator("sculpt.mask_filter", text="Decrease Contrast") op.filter_type = 'CONTRAST_DECREASE' op.auto_iteration_count = False @@ -5565,16 +5565,16 @@ class VIEW3D_MT_sculpt_face_sets_edit_pie(Menu): layout = self.layout pie = layout.menu_pie() - op = pie.operator("sculpt.face_sets_create", text='Face Set from Masked') + op = pie.operator("sculpt.face_sets_create", text="Face Set from Masked") op.mode = 'MASKED' - op = pie.operator("sculpt.face_sets_create", text='Face Set from Visible') + op = pie.operator("sculpt.face_sets_create", text="Face Set from Visible") op.mode = 'VISIBLE' - op = pie.operator("sculpt.face_set_change_visibility", text='Invert Visible') + op = pie.operator("sculpt.face_set_change_visibility", text="Invert Visible") op.mode = 'INVERT' - op = pie.operator("sculpt.reveal_all", text='Show All') + op = pie.operator("sculpt.reveal_all", text="Show All") class VIEW3D_MT_wpaint_vgroup_lock_pie(Menu): @@ -6974,9 +6974,9 @@ class VIEW3D_PT_snapping(Panel): col.prop(tool_settings, "use_snap_project") if 'FACE_NEAREST' in snap_elements: - col.prop(tool_settings, 'use_snap_to_same_target') + col.prop(tool_settings, "use_snap_to_same_target") if object_mode == 'EDIT': - col.prop(tool_settings, 'snap_face_nearest_steps') + col.prop(tool_settings, "snap_face_nearest_steps") if 'VOLUME' in snap_elements: col.prop(tool_settings, "use_snap_peel_object") diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 8ebc385a8ee..c6d6a77eec2 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -1084,7 +1084,7 @@ class VIEW3D_PT_tools_weightpaint_symmetry(Panel, View3DPaintPanel): wpaint = tool_settings.weight_paint mesh = context.object.data - layout.prop(mesh, 'use_mirror_vertex_groups') + layout.prop(mesh, "use_mirror_vertex_groups") draw_vpaint_symmetry(layout, wpaint, context.object) diff --git a/release/scripts/startup/keyingsets_builtins.py b/release/scripts/startup/keyingsets_builtins.py index 4390e6f0959..37032657d7a 100644 --- a/release/scripts/startup/keyingsets_builtins.py +++ b/release/scripts/startup/keyingsets_builtins.py @@ -597,7 +597,7 @@ class BUILTIN_KSI_DeltaRotation(KeyingSetInfo): path = keyingsets_utils.path_add_property(base_path, "delta_rotation_quaternion") elif data.rotation_mode == 'AXIS_ANGLE': # XXX: for now, this is not available yet - #path = path_add_property(base_path, "delta_rotation_axis_angle") + # path = path_add_property(base_path, "delta_rotation_axis_angle") return else: path = keyingsets_utils.path_add_property(base_path, "delta_rotation_euler") @@ -637,7 +637,7 @@ class BUILTIN_KSI_DeltaScale(KeyingSetInfo): ############################### -# Note that this controls order of options in 'insert keyframe' menu. +# Note that this controls order of options in `insert keyframe` menu. # Better try to keep some logical order here beyond mere alphabetical one, also because of menu entries shortcut. # See also T51867. classes = (