Hi,
I'd like to create a keyboard shortcut for cycling between the erase/add combine modes
(accessible through the menubar otherwise).
For this purpose, I tried to create a python script along the following lines:
~~~~
win = pya.Application.instance().main_window()
menu = win.menu()
act = menu.action("@toolbar.combine_mode.combine_mode_erase")
if act.is_checked():
act = menu.action("@toolbar.combine_mode.combine_mode_add")
act.trigger()
else:
act.trigger()
~~~~
The "is_checked" function does not however work as I would like it to work.
Is there some other way to check what the current combine mode status is?
Thanks!
Comments
Hi,
that's a configuration item embedded in the menu. It does not bind to an Action.
That's why you do it this way:
Values are:
add
merge
erase
mask
diff
Matthias