Register
Log in
Substance Forum
»
Substance Painter
»
Scripting
»
How can I assign custom shortcuts using the Python Console?
« Previous Topic
Next Topic »
Pages: [
1
]
Go Down
Author
Topic: How can I assign custom shortcuts using the Python Console? (Read 1549 times)
Emisphere66
Hi,
I'd like to have my own shortcuts when working in Painter (besides the ones already available in the Settings, Shortcuts). For instance, I'd like to assign a hotkey to 'Add Black Mask'.
How can I go about doing this?
Thx!
on:
March 12, 2021, 03:23:12 pm
Last Edit: March 12, 2021, 03:25:20 pm
Yifei Zhang 1
I used Pyside shortcut function in Painter. You could try it.
But you have to avoid current Default key short
Reply #1 on:
March 19, 2021, 09:25:26 am
Last Edit: March 23, 2021, 06:27:29 am
Maelvon
Interesting, but do you have any Python sample code to explain how you are doing?
Thanks,
Maelvon
Reply #2 on:
April 09, 2021, 08:48:20 am
Yifei Zhang 1
self.btn = QtWidgets.QPushButton('Button01')
self.btn.setShortcut('a')
Hope it could be helpful, One thing you have to do is you need to keep this button's panel stay at the screen, do not to remove it or minimize it into the dock.
Reply #3 on:
April 19, 2021, 09:47:48 am
Last Edit: April 19, 2021, 09:51:27 am
Pages: [
1
]
Go Up
« Previous Topic
Next Topic »
Substance Forum
»
Substance Painter
»
Scripting
»
How can I assign custom shortcuts using the Python Console?