Recent Posts

Tame Your Video Chaos: Master Smart Bins in Davinci Resolve

  Tame Your Video Chaos: Master Smart Bins in Davinci Resolve Are you drowning in a sea of clips? Is your media pool looking more like a cluttered closet than an organized workspace? Fear not, young video editor! There's a superhero tool waiting to save your sanity: Smart Bins. Imagine a magical sorting hat for your video clips. That's essentially what Smart Bins are in Davinci Resolve. These nifty little features automatically filter your footage, making it a breeze to find exactly what you need. Let's dive in and discover how to harness their power. What are Smart Bins? Think of Smart Bins as automated file folders for your videos and audio. They sort your media based on specific criteria, like whether a clip has been used, its audio type (dialogue, music, effects), or even its frame rate. This means less time hunting through endless thumbnails and more time unleashing your creativity. Getting Started with Smart Bins First things first, make sure Smart Bi...

Adding a Button in a Macro

Why on earth would we want a button in a macro?

A button can run any OS command, so you can do a lot. I am however going to keep this practical and for all the people out there that make macros for others. Our button will open a webpage, this webpage could be your website or even a YouTube video with instructions.

NB. A button can execute a script, run a fuse, or any known operating system command.

Adding a button is the same as adding a label or drop-down and can be completed inside resolve. However, you may want to edit the code to ensure the button works correctly on both Mac & Windows. Also, we can move the button to any location via the code.

Assumptions

  • You are on the fusion page
  • You are either modifying an existing tool/effect or creating your own.
  • The result will be a GroupOperator/MacroOperator
  • The result can be for fusion, edit page, or cut page.

  1. Select the node you want the Button on.
  2. Right-click and choose "Edit Controls"
  3. Over Type Name: "New Contol" with your button title
  4. Leave "Type" as "Number"
  5. Select the "Page" you want the label to be on (User)
  6. Uncheck "Animatable"
  7. Check "Passive"
  8. Input Crtl select ButtonControl
  9. Enter in the Execute box "os.execute('start "" "your url"') --Windows
  10. Select "OK"
9A. Enter "os.execute('open "" "your url"') --Mac
10. Select "OK"

The button will now appear at the bottom of the inspector on the page you selected. As long as the URL you entered is correct when you click on the button, the default web browser will open and navigate to it. The computer terminal or command prompt will flash on the screen for a millisecond as we have just triggered an OS command.


Hold the phone! What if you don't know the operating system this will be used on, well we are back to coding. (Although I have read that "open" will work on Mac or Windows).

The section of code we need to tweak will be the section created when we went into "Edit Controls" This generates the section called UserControls.

  1.                                   UserControls = ordered() {
  2. Button = {
  3. LINKS_Name = "Button",
  4. LINKID_DataType = "Number",
  5. INPID_InputControl = "ButtonControl",
  6. INP_Integer = false,
  7. INP_External = false,
  8. INP_Passive = true,
  9. BTNCS_Execute = [[
  10.                     os.execute('open "" "https://www.blackmagicdesign.com/"')
  11.                     os.execute('start "" "https://www.blackmagicdesign.com/"')
  12.                     ]],
  13. },
Adding lines 9, 10, 11 & 12 sets the button to open in Mac or Windows.

BTNCS_Execute = is a powerful command and can run almost anything.

The URL does not have to be a webpage it can also be a file path on the computer, so you could open a local webpage or a pdf file. 

If you require 2 buttons then just add another button to the same node, and then set the "width" to 0.5. width is above the execute box.


That's it!

Thanks for taking the time to read this post and if you would like to buy me a coffee, pizza, narrowboat then it is greatly appreciated.






Comments

  1. NIce. I learn a lot by reading your post.
    Many Thanks

    ReplyDelete
    Replies
    1. Thanks for reading the post. I have started a new website resolvebrowser.co.uk which includes more tips and tricks. Enjoy!

      Delete

Post a Comment

Popular posts from this blog

DaVinci Resolve Expressions

Things You Didn't Know the Text+ or Text1 Could Do!

Expression Builder Plugin V2.0