Cleanup: pep8
Quiet pylint warnings on keymaps.
This commit is contained in:
@@ -5,15 +5,15 @@ from bpy.props import (
|
||||
EnumProperty,
|
||||
)
|
||||
|
||||
dirname, filename = os.path.split(__file__)
|
||||
idname = os.path.splitext(filename)[0]
|
||||
DIRNAME, FILENAME = os.path.split(__file__)
|
||||
IDNAME = os.path.splitext(FILENAME)[0]
|
||||
|
||||
def update_fn(_self, _context):
|
||||
load()
|
||||
|
||||
|
||||
class Prefs(bpy.types.KeyConfigPreferences):
|
||||
bl_idname = idname
|
||||
bl_idname = IDNAME
|
||||
|
||||
select_mouse: EnumProperty(
|
||||
name="Select Mouse",
|
||||
@@ -154,7 +154,7 @@ class Prefs(bpy.types.KeyConfigPreferences):
|
||||
col.prop(self, "use_v3d_shade_ex_pie")
|
||||
|
||||
|
||||
blender_default = bpy.utils.execfile(os.path.join(dirname, "keymap_data", "blender_default.py"))
|
||||
blender_default = bpy.utils.execfile(os.path.join(DIRNAME, "keymap_data", "blender_default.py"))
|
||||
|
||||
|
||||
def load():
|
||||
@@ -163,7 +163,7 @@ def load():
|
||||
from bl_keymap_utils.io import keyconfig_init_from_data
|
||||
|
||||
prefs = context.preferences
|
||||
kc = context.window_manager.keyconfigs.new(idname)
|
||||
kc = context.window_manager.keyconfigs.new(IDNAME)
|
||||
kc_prefs = kc.preferences
|
||||
|
||||
keyconfig_data = blender_default.generate_keymaps(
|
||||
|
||||
@@ -4,15 +4,15 @@ from bpy.props import (
|
||||
EnumProperty,
|
||||
)
|
||||
|
||||
dirname, filename = os.path.split(__file__)
|
||||
idname = os.path.splitext(filename)[0]
|
||||
DIRNAME, FILENAME = os.path.split(__file__)
|
||||
IDNAME = os.path.splitext(FILENAME)[0]
|
||||
|
||||
def update_fn(_self, _context):
|
||||
load()
|
||||
|
||||
|
||||
class Prefs(bpy.types.KeyConfigPreferences):
|
||||
bl_idname = idname
|
||||
bl_idname = IDNAME
|
||||
|
||||
select_mouse: EnumProperty(
|
||||
name="Select Mouse",
|
||||
@@ -39,7 +39,7 @@ class Prefs(bpy.types.KeyConfigPreferences):
|
||||
split.column()
|
||||
|
||||
|
||||
blender_default = bpy.utils.execfile(os.path.join(dirname, "keymap_data", "blender_default.py"))
|
||||
blender_default = bpy.utils.execfile(os.path.join(DIRNAME, "keymap_data", "blender_default.py"))
|
||||
|
||||
def load():
|
||||
from sys import platform
|
||||
@@ -47,7 +47,7 @@ def load():
|
||||
from bl_keymap_utils.io import keyconfig_init_from_data
|
||||
|
||||
prefs = context.preferences
|
||||
kc = context.window_manager.keyconfigs.new(idname)
|
||||
kc = context.window_manager.keyconfigs.new(IDNAME)
|
||||
kc_prefs = kc.preferences
|
||||
|
||||
keyconfig_data = blender_default.generate_keymaps(
|
||||
|
||||
@@ -5,14 +5,14 @@ import bpy
|
||||
# ------------------------------------------------------------------------------
|
||||
# Keymap
|
||||
|
||||
dirname, filename = os.path.split(__file__)
|
||||
idname = os.path.splitext(filename)[0]
|
||||
DIRNAME, FILENAME = os.path.split(__file__)
|
||||
IDNAME = os.path.splitext(FILENAME)[0]
|
||||
|
||||
def update_fn(_self, _context):
|
||||
load()
|
||||
|
||||
|
||||
industry_compatible = bpy.utils.execfile(os.path.join(dirname, "keymap_data", "industry_compatible_data.py"))
|
||||
industry_compatible = bpy.utils.execfile(os.path.join(DIRNAME, "keymap_data", "industry_compatible_data.py"))
|
||||
|
||||
|
||||
def load():
|
||||
@@ -21,7 +21,7 @@ def load():
|
||||
|
||||
prefs = bpy.context.preferences
|
||||
|
||||
kc = bpy.context.window_manager.keyconfigs.new(idname)
|
||||
kc = bpy.context.window_manager.keyconfigs.new(IDNAME)
|
||||
params = industry_compatible.Params(use_mouse_emulate_3_button=prefs.inputs.use_mouse_emulate_3_button)
|
||||
keyconfig_data = industry_compatible.generate_keymaps(params)
|
||||
|
||||
|
||||
@@ -1059,9 +1059,10 @@ def km_view3d(params):
|
||||
("view3d.view_axis", {"type": 'NDOF_BUTTON_TOP', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("type", 'TOP'), ("align_active", True)]}),
|
||||
# Selection.
|
||||
*(("view3d.select",
|
||||
{"type": params.select_mouse, "value": params.select_mouse_value, **{m: True for m in mods}},
|
||||
{"properties": [(c, True) for c in props]},
|
||||
*((
|
||||
"view3d.select",
|
||||
{"type": params.select_mouse, "value": params.select_mouse_value, **{m: True for m in mods}},
|
||||
{"properties": [(c, True) for c in props]},
|
||||
) for props, mods in (
|
||||
(("deselect_all",) if not params.legacy else (), ()),
|
||||
(("toggle",), ("shift",)),
|
||||
@@ -2432,10 +2433,10 @@ def km_sequencer(params):
|
||||
{"properties": [("mode", 'TIME_EXTEND')]}),
|
||||
("marker.add", {"type": 'M', "value": 'PRESS'}, None),
|
||||
("marker.rename", {"type": 'M', "value": 'PRESS', "ctrl": True}, None),
|
||||
("sequencer.select",{"type": 'LEFT_BRACKET', "value": 'PRESS'},
|
||||
{"properties": [("left_right", 'LEFT'), ("linked_time", True)]}),
|
||||
("sequencer.select",{"type": 'RIGHT_BRACKET', "value": 'PRESS'},
|
||||
{"properties": [("left_right", 'RIGHT'), ("linked_time", True)]}),
|
||||
("sequencer.select", {"type": 'LEFT_BRACKET', "value": 'PRESS'},
|
||||
{"properties": [("left_right", 'LEFT'), ("linked_time", True)]}),
|
||||
("sequencer.select", {"type": 'RIGHT_BRACKET', "value": 'PRESS'},
|
||||
{"properties": [("left_right", 'RIGHT'), ("linked_time", True)]}),
|
||||
])
|
||||
|
||||
return keymap
|
||||
@@ -3277,7 +3278,7 @@ def km_grease_pencil_stroke_sculpt_mode(params):
|
||||
return keymap
|
||||
|
||||
|
||||
def km_grease_pencil_stroke_weight_mode(params):
|
||||
def km_grease_pencil_stroke_weight_mode(_params):
|
||||
items = []
|
||||
keymap = (
|
||||
"Grease Pencil Stroke Weight Mode",
|
||||
|
||||
Reference in New Issue
Block a user