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