Cleanup: reserve single quotes for enums
This commit is contained in:
@@ -485,7 +485,7 @@ class ARMATURE_OT_sync_bone_color_to_selected(Operator):
|
||||
num_pose_color_overrides = 0
|
||||
for index, bone_dest in enumerate(bones_dest):
|
||||
bone_dest.color.palette = bone_source.color.palette
|
||||
for custom_field in ('normal', 'select', 'active'):
|
||||
for custom_field in ("normal", "select", "active"):
|
||||
color = getattr(bone_source.color.custom, custom_field)
|
||||
setattr(bone_dest.color.custom, custom_field, color)
|
||||
|
||||
|
||||
@@ -1414,7 +1414,7 @@ rna_custom_property_subtype_vector_items = (
|
||||
)
|
||||
|
||||
rna_id_type_items = tuple((item.identifier, item.name, item.description, item.icon, item.value)
|
||||
for item in bpy.types.Action.bl_rna.properties['id_root'].enum_items)
|
||||
for item in bpy.types.Action.bl_rna.properties["id_root"].enum_items)
|
||||
|
||||
|
||||
class WM_OT_properties_edit(Operator):
|
||||
|
||||
@@ -294,7 +294,7 @@ class BONE_PT_display(BoneButtonsPanel, Panel):
|
||||
return context.bone or context.edit_bone
|
||||
|
||||
def draw(self, context):
|
||||
# note. this works ok in edit-mode but isn't
|
||||
# NOTE: this works ok in edit-mode but isn't
|
||||
# all that useful so disabling for now.
|
||||
layout = self.layout
|
||||
layout.use_property_split = True
|
||||
@@ -320,13 +320,13 @@ class BONE_PT_display(BoneButtonsPanel, Panel):
|
||||
layout.use_property_decorate = False
|
||||
|
||||
row = layout.row(align=True)
|
||||
row.prop(bone.color, 'palette', text='Bone Color')
|
||||
row.prop(bone.color, "palette", text="Bone Color")
|
||||
props = row.operator("armature.sync_bone_color_to_selected", text="", icon='UV_SYNC_SELECT')
|
||||
props.bone_type = 'EDIT'
|
||||
self.draw_bone_color_ui(layout, bone.color)
|
||||
|
||||
row = layout.row(align=True)
|
||||
row.prop(pose_bone.color, 'palette', text='Pose Bone Color')
|
||||
row.prop(pose_bone.color, "palette", text="Pose Bone Color")
|
||||
props = row.operator("armature.sync_bone_color_to_selected", text="", icon='UV_SYNC_SELECT')
|
||||
props.bone_type = 'POSE'
|
||||
self.draw_bone_color_ui(layout, pose_bone.color)
|
||||
@@ -338,7 +338,7 @@ class BONE_PT_display(BoneButtonsPanel, Panel):
|
||||
|
||||
col = layout.column()
|
||||
col.prop(bone, "hide", text="Hide", toggle=False)
|
||||
layout.prop(bone.color, 'palette', text='Edit Bone Color')
|
||||
layout.prop(bone.color, "palette", text="Edit Bone Color")
|
||||
self.draw_bone_color_ui(layout, bone.color)
|
||||
|
||||
def draw_bone_color_ui(self, layout, bone_color):
|
||||
|
||||
@@ -16,13 +16,13 @@ class ModifierButtonsPanel:
|
||||
class ModifierAddMenu:
|
||||
MODIFIER_TYPES_TO_LABELS = {
|
||||
enum_it.identifier: enum_it.name
|
||||
for enum_it in bpy.types.Modifier.bl_rna.properties['type'].enum_items_static
|
||||
for enum_it in bpy.types.Modifier.bl_rna.properties["type"].enum_items_static
|
||||
}
|
||||
MODIFIER_TYPES_TO_ICONS = {
|
||||
enum_it.identifier: enum_it.icon
|
||||
for enum_it in bpy.types.Modifier.bl_rna.properties['type'].enum_items_static
|
||||
for enum_it in bpy.types.Modifier.bl_rna.properties["type"].enum_items_static
|
||||
}
|
||||
MODIFIER_TYPES_I18N_CONTEXT = bpy.types.Modifier.bl_rna.properties['type'].translation_context
|
||||
MODIFIER_TYPES_I18N_CONTEXT = bpy.types.Modifier.bl_rna.properties["type"].translation_context
|
||||
|
||||
@classmethod
|
||||
def operator_modifier_add(cls, layout, mod_type):
|
||||
|
||||
@@ -257,7 +257,7 @@ class USERPREF_PT_interface_translation(InterfacePanel, CenterAlignMixIn, Panel)
|
||||
layout.prop(view, "language")
|
||||
|
||||
col = layout.column(heading="Affect")
|
||||
col.active = (bpy.app.translations.locale != 'en_US')
|
||||
col.active = (bpy.app.translations.locale != "en_US")
|
||||
col.prop(view, "use_translate_tooltips", text="Tooltips")
|
||||
col.prop(view, "use_translate_interface", text="Interface")
|
||||
col.prop(view, "use_translate_new_dataname", text="New Data")
|
||||
@@ -2486,7 +2486,7 @@ class ExperimentalPanel:
|
||||
|
||||
@classmethod
|
||||
def poll(cls, _context):
|
||||
return bpy.app.version_cycle == 'alpha'
|
||||
return bpy.app.version_cycle == "alpha"
|
||||
|
||||
def _draw_items(self, context, items):
|
||||
prefs = context.preferences
|
||||
|
||||
Reference in New Issue
Block a user