How do I reproduce [IKeyPress, SHIFT + CTRL, [CanvasClick,[MouseHPos],[MouseVPos]]] in ZBrush Python?
-
I’m trying to convert this ZScript behavior to ZBrush Python:
[IKeyPress, SHIFT + CTRL, [CanvasClick,[MouseHPos],[MouseVPos]]]My Python attempt is:
var = zbc.get_mouse_pos()
zbc.press_key("SHIFT + CTRL", lambda: zbc.canvas_click(var[0], var[1]))I’ve also tried several variations of the shortcut string, but none of them work.
What I already know:
zbc.canvas_click(var[0], var[1]) works by itself.
The problem only starts when I try to combine it with zbc.press_key().I already have a workaround by using zbc.press("macro button with [IKeyPress, SHIFT + CTRL, [CanvasClick,[MouseHPos],[MouseVPos]]] inside").
What works and what doesn't:
[Fails] zbc.press_key("CTRL+z")
[Works] zbc.press_key("N", lambda: press("Document:New Document")) (don't know what "N" does)
[Works] zbc.press_key("e", lambda: print("Scale mode enabled")) (don't know what "e" does)
[Works] zbc.press_key("SHIFT+p", lambda: zbc.press("Tool:Subtool:MoveUp")) (correctly simulates moving subtool to the top, i had to add a key ("p") to the shift modifier for it to work)What i would like to have clarified:
Is there a supported Python equivalent to ctrl + shift click?
If zbc.press_key() is the wrong tool, what is it actually doing internally?
Does it simulate real keyboard state?
Does it support modifier-only combinations like SHIFT+CTRL without a normal key?
Is this expected to fail with canvas_click() specifically?
In other words, does press_key() work only for certain commands, but not for canvas interaction?
I’m trying to avoid guesses here. A concrete answer about what press_key() can and cannot do would help a lot.