Skip to main content
March 12, 2023
Answered

Want Substance Painter Customize hotkeys

  • March 12, 2023
  • 1 reply
  • 1124 views

Hello, I'm a job seeker studying game graphics using Substance Painter.
I find it very inconvenient that there is no shortcut key for the "add black mask" feature in Substance Painter, so I wanted to add a custom shortcut key, but I don't know what the problem is because I have never learned coding.


I received help from ChatGPT to write the code and put the script in the Plugin folder under the Python menu at the top of the program, but the shortcut key compatibility still doesn't work in Adobe 3D Substance Painter.

I urgently need your help to solve this. Thank you in advance for your assistance.

 

Here is the content of the code that I have inserted

(The language used in the comments of the code is my native language.)

>>

 

import os
import sys
from PySide2.QtWidgets import *
from PySide2.QtGui import *
from PySide2.QtCore import *
from sd.api.sdapplication import SDApplication
from sd.api.sdshortcutregistry import SDShortcutRegistry

def register_shortcut():
# 플러그인에서 사용할 단축키
shortcut = "!d"
# 플러그인에서 호출할 함수 이름
func_name = "add_black_mask"
# 단축키를 등록할 객체
registry = SDShortcutRegistry.getDefault()
# 객체에 단축키 등록
registry.addShortcut(shortcut, func_name)

# 단축키가 호출될 함수
def add_black_mask():
# 여기에 원하는 동작을 추가합니다.
print("add_black_mask shortcut is called.")

# 플러그인이 로드될 때 호출되는 함수
def initialize_plugin():
# 단축키 등록
register_shortcut()
# 메시지 출력
QMessageBox.information(None, "Plugin", "Plugin is loaded successfully.")

# 플러그인 등록
SDApplication.getInstance().registerPythonPlugin(
"MyPlugin", # 플러그인 이름
"MyPlugin", # 플러그인 디렉토리 이름
"", # 플러그인 버전
None, # 플러그인 아이콘
None, # 플러그인 메뉴
None, # 플러그인 도움말
initialize_plugin # 플러그인 로드 시 호출할 함수
)

 

Correct answer Cyril Dellenbach

Hi @28830588,

 

Having Hotkeys (especially for adding a mask) would be great, but it is currently not possible, even trough our Python API.

 

Also, I wouldn't advise you to use ChatGPT for Substance 3D Painter, since it doesn't know anything of our API.

 

But let me consider your thread as a suggestion to add Hotkeys to Substance 3D Painter and I'll bring it up to the team.

 

Have a nice day.

 

1 reply

Cyril Dellenbach
Community Manager
Cyril DellenbachCommunity ManagerCorrect answer
Community Manager
March 13, 2023

Hi @28830588,

 

Having Hotkeys (especially for adding a mask) would be great, but it is currently not possible, even trough our Python API.

 

Also, I wouldn't advise you to use ChatGPT for Substance 3D Painter, since it doesn't know anything of our API.

 

But let me consider your thread as a suggestion to add Hotkeys to Substance 3D Painter and I'll bring it up to the team.

 

Have a nice day.

 

Cyril Dellenbach (Micro) | QA Support Artist | Adobe
March 14, 2023

Could you please let me know if it's not too much trouble if there is a shortcut key to insert a fill paint? I'm also wondering about that myself.

Participant
May 13, 2023

Fill paint

Ctrl+Shift+F