Is there LUA code to invoke menu items?

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message
Offline

Renderwurx

  • Posts: 6
  • Joined: Thu May 30, 2024 3:10 am
  • Real Name: David Johnson

Is there LUA code to invoke menu items?

PostWed Jul 10, 2024 7:35 am

Hi again! Having a ball working thru learning how to code things in Resolve/Fusion.

I was hoping someone might have an answer to this question...

Is there a LUA command/code snippet that invokes a menu option (built in function)?

For example, I would like to invoke the menu item: Fusion>Import>PSD...

I had hoped there was a folder somewhere with these functions in code... but I guess that is not a thing....

David
Offline
User avatar

Andrew Hazelden

  • Posts: 567
  • Joined: Sat Dec 06, 2014 12:10 pm
  • Location: West Dover, Nova Scotia, Canada

Re: Is there LUA code to invoke menu items?

PostWed Jul 10, 2024 2:06 pm

Renderwurx wrote:For example, I would like to invoke the menu item: Fusion>Import>PSD...


There are two different ways to achieve this:
Code: Select all
app:ToggleUtility("PSDImport")


Code: Select all
app:DoAction("Utility_Show", {id = "PSDImport"})
Mac Studio M2 Ultra / Threadripper 3990X | Fusion Studio 18.6.4 | Kartaverse 6
Offline

Renderwurx

  • Posts: 6
  • Joined: Thu May 30, 2024 3:10 am
  • Real Name: David Johnson

Re: Is there LUA code to invoke menu items?

PostThu Jul 11, 2024 10:47 am

OMG! That is perfect... Thank you SO much!!!!!!!!! I have spent many hours perusing the web, looking at VERY few examples of full out coding PSD import... and this is so simple and exactly what I needed!

Andrew Hazelden wrote:
Renderwurx wrote:For example, I would like to invoke the menu item: Fusion>Import>PSD...


There are two different ways to achieve this:
Code: Select all
app:ToggleUtility("PSDImport")


Code: Select all
app:DoAction("Utility_Show", {id = "PSDImport"})
Offline

Marcus Herrick

  • Posts: 49
  • Joined: Thu Aug 23, 2012 8:53 pm

Re: Is there LUA code to invoke menu items?

PostWed Jul 17, 2024 3:25 am

Wow! that open's up a heap of options! thanks.

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 3 guests