Cleanup: use single quotes for enums
This commit is contained in:
@@ -895,7 +895,7 @@ class LoadImageAsEmpty:
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return context.mode == "OBJECT"
|
||||
return context.mode == 'OBJECT'
|
||||
|
||||
def invoke(self, context, event):
|
||||
context.window_manager.fileselect_add(self)
|
||||
@@ -909,8 +909,8 @@ class LoadImageAsEmpty:
|
||||
try:
|
||||
image = bpy.data.images.load(self.filepath, check_existing=True)
|
||||
except RuntimeError as ex:
|
||||
self.report({"ERROR"}, str(ex))
|
||||
return {"CANCELLED"}
|
||||
self.report({'ERROR'}, str(ex))
|
||||
return {'CANCELLED'}
|
||||
|
||||
bpy.ops.object.empty_add(
|
||||
'INVOKE_REGION_WIN',
|
||||
|
||||
@@ -965,7 +965,7 @@ class PREFERENCES_OT_studiolight_install(Operator):
|
||||
|
||||
class PREFERENCES_OT_studiolight_new(Operator):
|
||||
"""Save custom studio light from the studio light editor settings"""
|
||||
bl_idname = 'preferences.studiolight_new'
|
||||
bl_idname = "preferences.studiolight_new"
|
||||
bl_label = "Save custom Studio light"
|
||||
|
||||
filename: StringProperty(
|
||||
@@ -1021,7 +1021,7 @@ class PREFERENCES_OT_studiolight_new(Operator):
|
||||
|
||||
class PREFERENCES_OT_studiolight_uninstall(Operator):
|
||||
"""Delete Studio Light"""
|
||||
bl_idname = 'preferences.studiolight_uninstall'
|
||||
bl_idname = "preferences.studiolight_uninstall"
|
||||
bl_label = "Uninstall Studio Light"
|
||||
index: bpy.props.IntProperty()
|
||||
|
||||
@@ -1044,7 +1044,7 @@ class PREFERENCES_OT_studiolight_uninstall(Operator):
|
||||
|
||||
class PREFERENCES_OT_studiolight_copy_settings(Operator):
|
||||
"""Copy Studio Light settings to the Studio light editor"""
|
||||
bl_idname = 'preferences.studiolight_copy_settings'
|
||||
bl_idname = "preferences.studiolight_copy_settings"
|
||||
bl_label = "Copy Studio Light settings"
|
||||
index: bpy.props.IntProperty()
|
||||
|
||||
|
||||
@@ -1750,7 +1750,7 @@ class WM_OT_drop_blend_file(Operator):
|
||||
|
||||
def invoke(self, context, event):
|
||||
context.window_manager.popup_menu(self.draw_menu, title=bpy.path.basename(self.filepath), icon='QUESTION')
|
||||
return {"FINISHED"}
|
||||
return {'FINISHED'}
|
||||
|
||||
def draw_menu(self, menu, context):
|
||||
layout = menu.layout
|
||||
|
||||
@@ -171,14 +171,14 @@ class BONE_PT_curved(BoneButtonsPanel, Panel):
|
||||
col.prop(bone, "bbone_handle_type_start", text="Start Handle")
|
||||
|
||||
col = col.column(align=True)
|
||||
col.active = (bone.bbone_handle_type_start != "AUTO")
|
||||
col.active = (bone.bbone_handle_type_start != 'AUTO')
|
||||
col.prop_search(bone, "bbone_custom_handle_start", arm, bone_list, text="Custom")
|
||||
|
||||
col = topcol.column(align=True)
|
||||
col.prop(bone, "bbone_handle_type_end", text="End Handle")
|
||||
|
||||
col = col.column(align=True)
|
||||
col.active = (bone.bbone_handle_type_end != "AUTO")
|
||||
col.active = (bone.bbone_handle_type_end != 'AUTO')
|
||||
col.prop_search(bone, "bbone_custom_handle_end", arm, bone_list, text="Custom")
|
||||
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ class RENDER_PT_color_management_curves(RenderButtonsPanel, Panel):
|
||||
|
||||
layout.enabled = view.use_curve_mapping
|
||||
|
||||
layout.template_curve_mapping(view, "curve_mapping", type="COLOR", levels=True)
|
||||
layout.template_curve_mapping(view, "curve_mapping", type='COLOR', levels=True)
|
||||
|
||||
|
||||
class RENDER_PT_eevee_ambient_occlusion(RenderButtonsPanel, Panel):
|
||||
|
||||
@@ -355,7 +355,7 @@ class DOPESHEET_MT_view(Menu):
|
||||
|
||||
# Add this to show key-binding (reverse action in dope-sheet).
|
||||
layout.separator()
|
||||
props = layout.operator("wm.context_set_enum", text="Toggle Graph Editor", icon="GRAPH")
|
||||
props = layout.operator("wm.context_set_enum", text="Toggle Graph Editor", icon='GRAPH')
|
||||
props.data_path = "area.type"
|
||||
props.value = 'GRAPH_EDITOR'
|
||||
|
||||
|
||||
@@ -219,7 +219,7 @@ class OUTLINER_MT_collection(Menu):
|
||||
|
||||
if space.display_mode == 'VIEW_LAYER':
|
||||
layout.separator()
|
||||
layout.menu("OUTLINER_MT_collection_view_layer", icon="RENDERLAYERS")
|
||||
layout.menu("OUTLINER_MT_collection_view_layer", icon='RENDERLAYERS')
|
||||
|
||||
layout.separator()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user