Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Switch/Enable tools entries

Hello,

I was wondering if there is a way (ideally in Python) to switch the selected tools,
for instance : I am on the move tool, I want to switch to the select tool.
But ideally I would be able to force to switch to the select tool, no matter what tool I am on in the beginning.

My main target is to make 2 programs:

  • one which ends up always with the select tool
  • one which ends up always with the ruler tool

Comments

  • Yes there is :-)

    To switch to "Select" mode, use:

    pya.MainWindow.instance().menu().action("@toolbar.select").trigger()
    

    To switch to "Move" mode, use:

    pya.MainWindow.instance().menu().action("@toolbar.move").trigger()
    

    Matthias

  • Thanks a lot Matthias it works great!
    I will just add to the answer for switching to the ruler tool (because of the question):

    pya.MainWindow.instance().menu().action("@toolbar.ruler").trigger()
    
Sign In or Register to comment.