Please Watch the DEMO VIDEO in the next post!
This button scratches this itch: when I have audio, video or image files, sometimes I want to see the dimensions (image or video files) or the duration (audio or video files). Both dimensions and duration start with the letter d… And I like the idea of a magic button, called with a single shortcut (say Ctrl + Alt + D) to show or hide the columns as appropriate.
- If the tab has no audio, video or image files, remove the dimensions and duration columns if they were present.
- If the tab has ‘dimension carrier files’ (image, video) but no ‘duration carrier files’, toggle the dimensions column.
- If the tab has ‘duration carrier files’ (audio, video) but no ‘dimension carrier files’, toggle the duration column.
- If the tab has both ‘duration carrier files’ and ‘dimension carrier files’, cycle between four states:
- both dimensions and duration OFF
- both dimensions and duration ON
duration ON, dimensions OFF
dimensions ON, duration OFF
A debug mode (set to false by default) is provided so you can see what’s going on.
This is one of my first experiments with button scripting, so if you see ridiculous things or better ways to do things, please let me know. For other beginners, I have commented the more obscure parts of the code (those introducing the Opus objects) so you can easily follow along.
Thanks in advance for your thoughts!
- change cycling order
- use clickData built-in Command object instead of creating via DOpusFactory
Cycle Dim Dur Columns.dcf (9.2 KB)