By Chris Shaw @Chris_Shaw2020-11-25 21:58:05.648Z
I'm trying to determine if a selected clip is a clip or a fade. If a fade is selected then the PT menu item Clip > Edit Lock/Unlock is greyed out / unavailable. How do I determine this with a script?
Ideas?
- Kitch Membery @Kitch2020-11-25 22:17:21.177Z
Hi Chris!
To work out if the selection info use this
sf.ui.proTools.selectionGetInfo()
As for the Menu Item Stand by...
- In reply toChris_Shaw⬆:Kitch Membery @Kitch2020-11-25 22:27:13.854Z
And here it is
const isMenuEnabled = sf.ui.proTools.getMenuItem("Clip", "Edit Lock/Unlock").isEnabled; log(isMenuEnabled);
Hope that helps :-)
- In reply toChris_Shaw⬆:Kitch Membery @Kitch2020-11-25 22:34:10.992Z
FYI... You can also check for "isMenuChecked";
Chris Shaw @Chris_Shaw2020-11-25 22:58:51.036Z
Awesome. Thanks!