From ba438ecd16207700ffd849820796b6f833beef21 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 10 Oct 2023 01:05:27 +0200 Subject: Add new "copy markers from this DCP" option (#2628). Also stop the "copy settings" options from doing this, as Carsten points out that it could be confusing and potentially very bad if you copy markers from an OV to an edited VF which then bring house lights up at the wrong time or whatever. --- src/lib/copy_dcp_details_to_film.cc | 13 +++++++++---- src/lib/copy_dcp_details_to_film.h | 1 + 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'src/lib') diff --git a/src/lib/copy_dcp_details_to_film.cc b/src/lib/copy_dcp_details_to_film.cc index 206475ed6..669fc8ac9 100644 --- a/src/lib/copy_dcp_details_to_film.cc +++ b/src/lib/copy_dcp_details_to_film.cc @@ -61,12 +61,17 @@ copy_dcp_settings_to_film(shared_ptr dcp, shared_ptr fil film->set_audio_channels (dcp->audio->stream()->channels()); } + film->set_ratings (dcp->ratings()); + film->set_content_versions (dcp->content_versions()); +} + + +void +copy_dcp_markers_to_film(shared_ptr dcp, shared_ptr film) +{ film->clear_markers (); for (auto const& i: dcp->markers()) { - film->set_marker (i.first, dcpomatic::DCPTime(i.second.get())); + film->set_marker(i.first, dcpomatic::DCPTime(i.second.get())); } - - film->set_ratings (dcp->ratings()); - film->set_content_versions (dcp->content_versions()); } diff --git a/src/lib/copy_dcp_details_to_film.h b/src/lib/copy_dcp_details_to_film.h index 99f9cdeb7..0948cbec1 100644 --- a/src/lib/copy_dcp_details_to_film.h +++ b/src/lib/copy_dcp_details_to_film.h @@ -27,3 +27,4 @@ class Film; extern void copy_dcp_settings_to_film(std::shared_ptr dcp, std::shared_ptr film); +extern void copy_dcp_markers_to_film(std::shared_ptr dcp, std::shared_ptr film); -- cgit v1.2.3