Old 08-28-2019, 08:08 AM   #1
Travesty
Human being with feelings
 
Travesty's Avatar
 
Join Date: Nov 2014
Posts: 506
Default Clear media explorer preview

Hi, I need to clear the media explorer preview from script, so I can overwrite files without obstruction.

So far I've found an action "Unload current preview media", but it's in the media explorer section and there appears not to be an "OnCommand" function for the media explorer.

Does anyone have any suggestions on how to clear the preview?
Travesty is offline   Reply With Quote
Old 08-28-2019, 04:10 PM   #2
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 6,041
Default

Close media explorer should work and then reopen it. it will not keep scroll pos and filter though
X-Raym is offline   Reply With Quote
Old 08-29-2019, 05:17 AM   #3
Travesty
Human being with feelings
 
Travesty's Avatar
 
Join Date: Nov 2014
Posts: 506
Default

Cool, I'll see if that works without too much graphical disruption.

I found another workaround, point it at a file you know will never be in the preview.

The script in question finishes by focusing the output files in the media explorer, so while the render takes place now I point media explorer at a blank wave file in a particular location. This clears the preview, and then the media explorer focuses the output location at the end, so you only briefly see the blank wave file in the media explorer.
Travesty is offline   Reply With Quote
Old 08-29-2019, 06:35 AM   #4
Travesty
Human being with feelings
 
Travesty's Avatar
 
Join Date: Nov 2014
Posts: 506
Default

I can't see a way to close media explorer via script
Travesty is offline   Reply With Quote
Old 08-29-2019, 06:39 AM   #5
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 6,041
Default

MAIN: Media explorer: Show/hide media explorer


this is the toggle state / action to inspect / run
X-Raym is offline   Reply With Quote
Old 08-29-2019, 08:19 AM   #6
Travesty
Human being with feelings
 
Travesty's Avatar
 
Join Date: Nov 2014
Posts: 506
Default

Ah yes, was being blind. Thanks
Travesty is offline   Reply With Quote
Old 08-29-2019, 08:25 AM   #7
Travesty
Human being with feelings
 
Travesty's Avatar
 
Join Date: Nov 2014
Posts: 506
Default

Yeah, your solution is better than mine. It's still a little messy, but it's less weird.

Would be cool if we got a MediaExplorer_OnCommand function at some point though.
Travesty is offline   Reply With Quote
Old 08-29-2019, 08:37 AM   #8
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,565
Default

If you use my Ultraschall-API, you can use MediaExplorer_OnCommand, which I coded for exactly such purposes.
It runs Actions from the MediaExplorer-section.

https://mespotin.uber.space/Ultrasch...orer_OnCommand
__________________
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635
mespotine is offline   Reply With Quote
Old 09-02-2019, 06:04 AM   #9
Travesty
Human being with feelings
 
Travesty's Avatar
 
Join Date: Nov 2014
Posts: 506
Default

Ah, brilliant, thanks. I did look through your API, I missed that somehow.
Travesty is offline   Reply With Quote
Old 09-03-2019, 12:02 AM   #10
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,565
Default

Quote:
Originally Posted by Travesty View Post
Ah, brilliant, thanks. I did look through your API, I missed that somehow.
I had added it in the most recent version
__________________
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635
mespotine is offline   Reply With Quote
Old 09-11-2019, 08:41 AM   #11
Travesty
Human being with feelings
 
Travesty's Avatar
 
Join Date: Nov 2014
Posts: 506
Default

Ah, that must be why. Thanks
Travesty is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 11:41 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.