VoiceScript.h header
#include <ew/core/VoiceScript.h>
Namespace ew::core
VoiceScript class
class ew::core::VoiceScript
A recording script: the lines to be voiced, in the order they are recorded.
A project holds SEVERAL of these – one per episode, chapter or session – rather than a single global line list, because a recording script is the unit a studio is actually booked against and the unit a director works through in a day. It is also what keeps each file reviewable in Perforce instead of one file every VO change touches.
Modelled on BranchScene deliberately: a ContentObject owning a vector of its own items, with stable per-item identity. Both are "one object, many parts the author reorders", and matching shapes means the store, the undo command and the dock all work the way the branching ones do.
Members
ew::core::voice::VoiceScript::VoiceScript(ew::core::foundation::ContentId id, QString title)
Creates an empty script with identity id and title.
const QString & ew::core::voice::VoiceScript::title() const
The script's title.
void ew::core::voice::VoiceScript::setTitle(QString title)
Sets the title.
const std::vector< VoiceLine > & ew::core::voice::VoiceScript::lines() const
The lines, in recording order.
void ew::core::voice::VoiceScript::setLines(std::vector< VoiceLine > lines)
Replaces every line.
const VoiceLine * ew::core::voice::VoiceScript::findLine(ew::core::foundation::ContentId id) const
The line with id, or null when the script has none.
No production caller, and kept deliberately – a dead-code sweep will keep finding it, so the reason is here rather than rediscovered. The panel addresses lines by table row, which is correct for a table; this answers the identity question instead, and its consumers are the round-trip tests that assert a save/load preserves each line's id. That is a real contract worth asserting, and hand-rolling the search at each assertion would be worse code than the two lines it replaces. Parallel to BranchScene::findNode, which the branching editor does use.
Functions
std::size_t ew::core::voice::countAtStatus(const VoiceScript &script, RecordingStatus status)
How many lines in script are at status.
The number a producer actually asks for – "how many pickups do we owe?" – and the reason status being derived matters: this counts the script as it reads now, not as it was last marked up.