Add Easy_Weight
to Addons
#47
BIN
__pycache__/__init__.cpython-37.pyc
Normal file
BIN
__pycache__/__init__.cpython-37.pyc
Normal file
Binary file not shown.
BIN
__pycache__/change_brush.cpython-37.pyc
Normal file
BIN
__pycache__/change_brush.cpython-37.pyc
Normal file
Binary file not shown.
BIN
__pycache__/force_apply_mirror.cpython-37.pyc
Normal file
BIN
__pycache__/force_apply_mirror.cpython-37.pyc
Normal file
Binary file not shown.
BIN
__pycache__/smart_weight_transfer.cpython-37.pyc
Normal file
BIN
__pycache__/smart_weight_transfer.cpython-37.pyc
Normal file
Binary file not shown.
BIN
__pycache__/toggle_weight_paint.cpython-37.pyc
Normal file
BIN
__pycache__/toggle_weight_paint.cpython-37.pyc
Normal file
Binary file not shown.
BIN
__pycache__/utils.cpython-37.pyc
Normal file
BIN
__pycache__/utils.cpython-37.pyc
Normal file
Binary file not shown.
BIN
__pycache__/weight_paint_context_menu.cpython-37.pyc
Normal file
BIN
__pycache__/weight_paint_context_menu.cpython-37.pyc
Normal file
Binary file not shown.
@ -50,7 +50,10 @@ class ChangeWPBrush(bpy.types.Operator):
|
|||||||
def register_brush_switch_hotkeys(dummy):
|
def register_brush_switch_hotkeys(dummy):
|
||||||
# Without this, the hotkeys' properties get reset whenever the addon is disabled, which results in having to set the Add, Subtract, Blur brushes on the hotkeys manually every time.
|
# Without this, the hotkeys' properties get reset whenever the addon is disabled, which results in having to set the Add, Subtract, Blur brushes on the hotkeys manually every time.
|
||||||
# However, with this, the hotkey cannot be changed, since this will forcibly re-create the original anyways.
|
# However, with this, the hotkey cannot be changed, since this will forcibly re-create the original anyways.
|
||||||
wp_hotkeys = bpy.data.window_managers[0].keyconfigs.active.keymaps['Weight Paint'].keymap_items
|
|
||||||
|
active_keyconfig = bpy.data.window_managers[0].keyconfigs.active
|
||||||
|
if not active_keyconfig: return # Avoid error when running without UI.
|
||||||
|
wp_hotkeys = active_keyconfig.keymaps['Weight Paint'].keymap_items
|
||||||
|
|
||||||
add_hotkey = wp_hotkeys.new('brush.set_specific',value='PRESS',type='ONE',ctrl=False,alt=False,shift=False,oskey=False)
|
add_hotkey = wp_hotkeys.new('brush.set_specific',value='PRESS',type='ONE',ctrl=False,alt=False,shift=False,oskey=False)
|
||||||
add_hotkey.properties.brush = 'Add'
|
add_hotkey.properties.brush = 'Add'
|
||||||
|
Loading…
Reference in New Issue
Block a user