|
|
|
01-17-2022, 10:45 AM
|
#1
|
Human being with feelings
Join Date: Jul 2007
Location: Jazz City
Posts: 5,065
|
Change item colour when "frozen"?
Ahoy ReaScripters,
is there a way to auto-change the item colour if the item name contains the string "freeze"? Analog to SWS "Auto-color", but for items instead of tracks?
When the track height is too small it's impossible to perceive the little lock icons on frozen items, so what I'd love to have is a dedicated colour, e.g. white, if the script detects the appropriate string.
(Reason: today I've worked for hours until I realized that the overhead track wasn't the original but a previously frozen track which messed up the whole drum mix - due to a non-working room correction chain in the recent weeks. A unique item colour might have prevented that slip.)
Help a brother out, cheers!
__________________
Windows 10x64 | AMD Ryzen 3700X | ATI FirePro 2100 | Marian Seraph AD2, 4.3.8 | Yamaha Steinberg MR816x
"If I can hear well, then everything I do is right" (Allen Sides)
|
|
|
01-17-2022, 01:12 PM
|
#2
|
Human being with feelings
Join Date: Dec 2012
Posts: 13,333
|
This should work. It's lua code.
Code:
function main()
if reaper.GetSelectedTrack2(0,0,false) then
sel_track = reaper.GetSelectedTrack2(0,0,false)
for i=0, reaper.CountTrackMediaItems(sel_track)-1 do
sel_item = reaper.GetTrackMediaItem(sel_track, i)
item_name = reaper.GetTakeName(reaper.GetActiveTake(sel_item))
if string.find(item_name, 'freeze') ~= nil then
yes = reaper.ColorToNative(0, 255, 204)
reaper.SetMediaItemInfo_Value(sel_item, 'I_CUSTOMCOLOR', reaper.ColorToNative(0, 255, 204)|0x1000000)
end
end
end
reaper.defer(main)
end
main()
|
|
|
01-17-2022, 11:47 PM
|
#3
|
Human being with feelings
Join Date: Jul 2007
Location: Jazz City
Posts: 5,065
|
Ooooh, thanks so much! Will test it later.
And sorry for my delayed response, I never get notifications for my own threads.
__________________
Windows 10x64 | AMD Ryzen 3700X | ATI FirePro 2100 | Marian Seraph AD2, 4.3.8 | Yamaha Steinberg MR816x
"If I can hear well, then everything I do is right" (Allen Sides)
|
|
|
01-18-2022, 01:27 AM
|
#4
|
Human being with feelings
Join Date: Dec 2012
Posts: 13,333
|
Quote:
Originally Posted by beingmf
Ooooh, thanks so much! Will test it later.
And sorry for my delayed response, I never get notifications for my own threads.
|
No one does. You can set notifications to send you an email.
|
|
|
01-18-2022, 03:21 AM
|
#5
|
Human being with feelings
Join Date: Jul 2007
Location: Jazz City
Posts: 5,065
|
The script works! Thanks soooo much, Vitalker, it's already pinned to a contextual toolbar!
__________________
Windows 10x64 | AMD Ryzen 3700X | ATI FirePro 2100 | Marian Seraph AD2, 4.3.8 | Yamaha Steinberg MR816x
"If I can hear well, then everything I do is right" (Allen Sides)
|
|
|
01-18-2022, 03:38 AM
|
#6
|
Human being with feelings
Join Date: Dec 2012
Posts: 13,333
|
Quote:
Originally Posted by beingmf
The script works! Thanks soooo much, Vitalker, it's already pinned to a contextual toolbar!
|
You're welcome. You could also put it to startup actions, so no need to run it manually.
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 05:21 AM.
|