Shortcut for menu icon item

Next
 From:  MarkBTomlinson
9333.1 
Hi,
I would like to add a Shortcut to the ObjectLibrary add-on and I am not sure how you call the function.
On the same theme is there a way to see the calls made when a button is clicked somewhere to help with such questions.

Thanks Guys

3D Hard Surface
https://mbt3d.com
https://www.artstation.com/artist/markbtomlinson

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
9333.2 In reply to 9333.1 
Hi Mark,

> I would like to add a Shortcut to the ObjectLibrary add-on and I am not sure how you call the function.

What version of CustomUI are you using and which version of MoI?


> On the same theme is there a way to see the calls made when a button is clicked somewhere to help with such questions.

For this case it's kind of hard to see the code. For CustomUI the buttons are going to be contained in .js files. For the object library it will be a file like ObjLibrary.js and it builds up a <moi:CommandMenuButton> with a menu="" attribute on it. Then it's built in to buttons that if they have a menu="" attribute that it will show the menu when it's clicked.

But if you can tell me what versions you are using I think I can set up a shortcut key that triggers a click on the button.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  MarkBTomlinson
9333.3 
Sorry I should have mentioned that, it is the last beta version, not sure what version of the customui it is though the latest I suppose.

I had a look and couldn't see a date but I will attatch the files:

EDITED: 9 Apr 2019 by MARKBTOMLINSON


  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
9333.4 In reply to 9333.3 
Hi Mark, does this work for you? :

script: moi.ui.createDialog( 'moi://appdata/customui/ObjLibrary.menu.htm' );

That willl show it as a dialog rather than as a flyout menu.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  MarkBTomlinson
9333.5 In reply to 9333.4 
Thank you Michael that helps a lot and yes it works perfectly.

3D Hard Surface
https://mbt3d.com
https://www.artstation.com/artist/markbtomlinson

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All