Cleanup: remove f-string use, single quote enums
This commit is contained in:
@@ -1049,8 +1049,7 @@ class WM_OT_url_open(Operator):
|
||||
@staticmethod
|
||||
def _get_utm_source():
|
||||
version = bpy.app.version_string
|
||||
formatted_version = version.replace(' ', '-').lower()
|
||||
return f"blender-{formatted_version}"
|
||||
return "blender-" + version.replace(" ", "-").lower()
|
||||
|
||||
def execute(self, _context):
|
||||
import webbrowser
|
||||
@@ -2799,7 +2798,7 @@ class WM_OT_batch_rename(Operator):
|
||||
"name",
|
||||
iface_("Material(s)"),
|
||||
)
|
||||
elif data_type == "ACTION_CLIP":
|
||||
elif data_type == 'ACTION_CLIP':
|
||||
data = (
|
||||
(
|
||||
# Outliner.
|
||||
|
||||
@@ -238,8 +238,8 @@ class UILIST_OT_entry_move(GenericUIListOperator, Operator):
|
||||
active_index = self.get_active_index(context)
|
||||
|
||||
delta = {
|
||||
"DOWN": 1,
|
||||
"UP": -1,
|
||||
'DOWN': 1,
|
||||
'UP': -1,
|
||||
}[self.direction]
|
||||
|
||||
to_index = (active_index + delta) % len(my_list)
|
||||
|
||||
@@ -99,7 +99,7 @@ class DATA_UL_bone_groups(UIList):
|
||||
layout.prop(item, "name", text="", emboss=False, icon='GROUP_BONE')
|
||||
|
||||
if item.is_custom_color_set or item.color_set == 'DEFAULT':
|
||||
layout.prop(item, "color_set", icon_only=True, icon="COLOR")
|
||||
layout.prop(item, "color_set", icon_only=True, icon='COLOR')
|
||||
else:
|
||||
layout.prop(item, "color_set", icon_only=True)
|
||||
|
||||
@@ -174,7 +174,7 @@ class DATA_PT_bone_groups(ArmatureButtonsPanel, Panel):
|
||||
|
||||
class DATA_PT_iksolver_itasc(ArmatureButtonsPanel, Panel):
|
||||
bl_label = "Inverse Kinematics"
|
||||
bl_options = {"DEFAULT_CLOSED"}
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
|
||||
@@ -964,7 +964,7 @@ def brush_settings_advanced(layout, context, brush, popover=False):
|
||||
|
||||
if is_cavity_active:
|
||||
props = row.operator("sculpt.mask_from_cavity", text="Create Mask")
|
||||
props.settings_source = "BRUSH"
|
||||
props.settings_source = 'BRUSH'
|
||||
|
||||
col.prop(brush, "use_automasking_cavity_inverted", text="Cavity (inverted)")
|
||||
|
||||
|
||||
@@ -292,7 +292,7 @@ class GRAPH_MT_key_blending(Menu):
|
||||
|
||||
def draw(self, _context):
|
||||
layout = self.layout
|
||||
layout.operator_context = "INVOKE_DEFAULT"
|
||||
layout.operator_context = 'INVOKE_DEFAULT'
|
||||
layout.operator("graph.breakdown", text="Breakdown")
|
||||
layout.operator("graph.blend_to_neighbor", text="Blend to Neighbor")
|
||||
layout.operator("graph.blend_to_default", text="Blend to Default Value")
|
||||
@@ -304,7 +304,7 @@ class GRAPH_MT_key_smoothing(Menu):
|
||||
|
||||
def draw(self, _context):
|
||||
layout = self.layout
|
||||
layout.operator_context = "INVOKE_DEFAULT"
|
||||
layout.operator_context = 'INVOKE_DEFAULT'
|
||||
layout.operator("graph.gaussian_smooth", text="Smooth (Gaussian)")
|
||||
layout.operator("graph.smooth", text="Smooth (Legacy)")
|
||||
|
||||
@@ -377,7 +377,7 @@ class GRAPH_MT_slider(Menu):
|
||||
|
||||
def draw(self, _context):
|
||||
layout = self.layout
|
||||
layout.operator_context = "INVOKE_DEFAULT"
|
||||
layout.operator_context = 'INVOKE_DEFAULT'
|
||||
layout.operator("graph.breakdown", text="Breakdown")
|
||||
layout.operator("graph.blend_to_neighbor", text="Blend to Neighbor")
|
||||
layout.operator("graph.blend_to_default", text="Blend to Default Value")
|
||||
|
||||
@@ -569,7 +569,7 @@ class _draw_tool_settings_context_mode:
|
||||
row.prop(brush.curves_sculpt_settings, "density_add_attempts", text="Count Max")
|
||||
layout.popover("VIEW3D_PT_tools_brush_falloff")
|
||||
layout.popover("VIEW3D_PT_curves_sculpt_add_shape", text="Curve Shape")
|
||||
elif curves_tool == "SLIDE":
|
||||
elif curves_tool == 'SLIDE':
|
||||
layout.popover("VIEW3D_PT_tools_brush_falloff")
|
||||
|
||||
return True
|
||||
@@ -3413,7 +3413,7 @@ class VIEW3D_MT_mask(Menu):
|
||||
layout.separator()
|
||||
|
||||
props = layout.operator("sculpt.mask_from_cavity", text="Mask From Cavity")
|
||||
props.settings_source = "OPERATOR"
|
||||
props.settings_source = 'OPERATOR'
|
||||
|
||||
layout.separator()
|
||||
|
||||
@@ -7899,7 +7899,7 @@ class VIEW3D_PT_sculpt_automasking(Panel):
|
||||
|
||||
if is_cavity_active:
|
||||
props = row.operator("sculpt.mask_from_cavity", text="Create Mask")
|
||||
props.settings_source = "SCENE"
|
||||
props.settings_source = 'SCENE'
|
||||
|
||||
col.prop(sculpt, "use_automasking_cavity_inverted", text="Cavity (inverted)")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user