Old 09-17-2018, 05:45 AM   #1
Soundwizard
Human being with feelings
 
Soundwizard's Avatar
 
Join Date: Dec 2015
Posts: 12
Default Children take Parent name as prefix

I am looking for a way to make children tracks take the parent track name as a prefix automatically as they are created.

So if I make a track named "AMB_", and then I create another track that is blank and place it as a child in the "AMB_" track, it will automatically gain the "AMB_" as a prefix name.

Is there a way to make that happen?
Soundwizard is offline   Reply With Quote
Old 09-17-2018, 08:37 AM   #2
bobobo
Human being with feelings
 
bobobo's Avatar
 
Join Date: Oct 2014
Posts: 1,356
Default

very simple solution (i don't recommend to use it, i'd sick to sws autocoloring to create visual neatness)

select all but the first folder and run the script
attention : if you run it twice you get the hell on earth
it stacks foldernames !

save it as !renchildtoparent.eel and load it in the actions


Code:
/*
   * ReaScript Name: Rename selected tracks to Folder Parenttrack
   * EEL script for Cockos REAPER
   * dervied from script by  spk77

   * Licence: GPL v3
   * Version: 1.0
   */
  
  // Rename selected tracks to Parent_child
  
function main() local (sel_track_count, t_i, tr, first_item)
(
  (sel_track_count = CountSelectedTracks(0)) ? (
    t_i = 0;
    Undo_BeginBlock();
    loop(sel_track_count,
      (tr = GetSelectedTrack(0, t_i)) ? (
         GetTrackname(tr,#trackori);
         GetTrackName(GetParentTrack(tr),#trackname);
         GetSetMediaTrackInfo_String(tr, "P_NAME", strcat( strcat(#trackname,"_"),#trackori), 1);
      );
      t_i += 1;
    );
    Undo_EndBlock("Rename tracks", -1);
  ) : ShowConsoleMsg("Please select tracks");
);

main();
i made another one that renames only tracks when they are not folder itself.
you'll find it here

Last edited by bobobo; 09-18-2018 at 04:31 AM.
bobobo is offline   Reply With Quote
Old 09-19-2018, 08:05 AM   #3
hopi
Human being with feelings
 
hopi's Avatar
 
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
Default

look around for an action or script to append to selected track names...
I don't recall then exactly but do recall they exist
__________________
...should be fixed for the next build... http://tinyurl.com/cr7o7yl
https://soundcloud.com/hopikiva
hopi is offline   Reply With Quote
Old 09-21-2018, 02:33 AM   #4
Soundwizard
Human being with feelings
 
Soundwizard's Avatar
 
Join Date: Dec 2015
Posts: 12
Default

Quote:
Originally Posted by bobobo View Post
very simple solution (i don't recommend to use it, i'd sick to sws autocoloring to create visual neatness)

select all but the first folder and run the script
attention : if you run it twice you get the hell on earth
it stacks foldernames !

save it as !renchildtoparent.eel and load it in the actions


Code:
/*
   * ReaScript Name: Rename selected tracks to Folder Parenttrack
   * EEL script for Cockos REAPER
   * dervied from script by  spk77

   * Licence: GPL v3
   * Version: 1.0
   */
  
  // Rename selected tracks to Parent_child
  
function main() local (sel_track_count, t_i, tr, first_item)
(
  (sel_track_count = CountSelectedTracks(0)) ? (
    t_i = 0;
    Undo_BeginBlock();
    loop(sel_track_count,
      (tr = GetSelectedTrack(0, t_i)) ? (
         GetTrackname(tr,#trackori);
         GetTrackName(GetParentTrack(tr),#trackname);
         GetSetMediaTrackInfo_String(tr, "P_NAME", strcat( strcat(#trackname,"_"),#trackori), 1);
      );
      t_i += 1;
    );
    Undo_EndBlock("Rename tracks", -1);
  ) : ShowConsoleMsg("Please select tracks");
);

main();
i made another one that renames only tracks when they are not folder itself.
you'll find it here
Thanks a million! This is awesome.
Soundwizard 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 01:37 PM.


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