When I read your post, I thought that renaming the markers would be easy to do with a script....
So I wrote one:
- Code: Select all
-- This script adds/removes the color name to the marker names
-- in the current timeline and the selected clips in the media pool.
-- Switch: true = add color name, false = remove color name
local prefixColor = true
resolve = Resolve()
project = resolve:GetProjectManager():GetCurrentProject()
timeline = project:GetCurrentTimeline()
mediaPool = project:GetMediaPool()
clips = mediaPool:GetSelectedClips()
function AddColor2Markers(markers, clip)
for frame, m in pairs(markers) do
local color, name = m.color, m.name
local note = m.note or ""
local duration = m.duration or 1.0
local custom = m.customData or ""
if prefixColor then
if not string.find(name, color) then
name = color .. " " .. name
end
else
local pattern = "^" .. color .. "%s+"
name = string.gsub(name, pattern, "", 1)
end
local target = clip or timeline
if target then
target:DeleteMarkerAtFrame(frame)
target:AddMarker(frame, color, name, note, duration, custom)
end
end
end
if timeline then
AddColor2Markers(timeline:GetMarkers())
for _, t in ipairs({"video", "audio"}) do
for i = 1, timeline:GetTrackCount(t) do
if timeline:GetIsTrackEnabled(t, i) then
for _, c in ipairs(timeline:GetItemListInTrack(t, i)) do
if next(c:GetMarkers()) then table.insert(clips, c) end
end
end
end
end
end
for _, c in ipairs(clips) do
AddColor2Markers(c:GetMarkers(), c)
end
This script prepends the color name to the marker names in the current timeline and the selected clips in the media pool.
Save it as a .lua file in the scripts directory.
You will then find it in the Workspace menu.
Here is the script directory:
Mac OS X:
/Library/Application Support/Blackmagic Design/DaVinci Resolve/Fusion/Scripts
Windows:
%PROGRAMDATA%\Blackmagic Design\DaVinci Resolve\Fusion\Scripts
Linux:
/opt/resolve/Fusion/Scripts