Created
July 5, 2010 22:58
-
-
Save julik/464794 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//SIZZLET Rename and Renumber Selected Trackers | |
// Renames or prefixes selected tracker names | |
dlg = NewDialog("pfxTrackersDLG") | |
dlg.Radio("doPrefix", "Prefix existing names", 1) | |
dlg.Radio("doSuffix", "Suffix existing names", 0) | |
dlg.Radio("doRename", "Rename and renumber in selection", 0) | |
dlg.String("renameString", "Name prefix", "Xtra") | |
dlg.Show() | |
obj = Scene.activeObj | |
ti = 0; | |
for (tk in obj.trk) | |
if(tk.isSel) | |
if (dlg.doRename) | |
ti++; | |
tk.nm = printf("%s_%d", dlg.renameString, ti) | |
elsif (dlg.doSuffix) | |
tk.nm = printf("%s_%s", tk.nm, dlg.renameString) | |
else | |
tk.nm = printf("%s_%s", dlg.renameString, tk.nm) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment