- Posts: 78
- Joined: Mon Feb 24, 2020 5:44 pm
- Real Name: Ben Traje
Here's one that will create Savers based on all selected Loaders, with the requested filename change:
- Code: Select all
comp:Lock()
flow = comp.CurrentFrame.FlowView
for i, tool in ipairs(comp:GetToolList(true, "Loader")) do
local x,y = flow:GetPos(tool)
local sv = comp:AddTool("Saver", x+2, y)
pathtable = bmd.parseFilename(tool.Clip[comp.CurrentTime])
sv.Clip = pathtable.Path..pathtable.CleanName.."_fixed."..pathtable.SNum..pathtable.Extension
end
comp:Unlock()
Simply paste that into the Console's text entry line and hit enter. You'll get a Saver for each selected Loader, positioned two grid units to the right. If your images aren't sequences, you may wind up with an extra . right before the extension. You can remove that from the code—it's in the third-to-last line. Change "_fixed." to "_fixed" to get rid of it, if desired.
edit: If this is something you'll do frequently, you could save the above in your Scripts/comp folder with a .lua extension, and it will show up in the Script menu.