MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ resolve_sequence_path()

std::string MayaFlux::IO::resolve_sequence_path ( std::string_view pattern,
uint64_t frame )
inlinenodiscard

Substitute a frame index into a numbered output pattern.

Wraps resolve_write_path, so the same directory rules apply and a bare pattern lands wherever a bare filename would.

The pattern carries exactly one std::format replacement field, which the index is formatted into: "smoke.{:04}.vdb" at frame 7 gives "smoke.0007.vdb". Zero padding matters. A DCC reading a sequence matches on a fixed-width numeric suffix, so an unpadded pattern sorts frame 10 before frame 2 and plays out of order.

A pattern with no replacement field returns the same path every frame, which silently overwrites. A pattern with more than one, or with a field the index cannot format into, throws std::format_error.

Parameters
patternFormat string with one index field.
frameZero-based frame index.
Returns
Resolved absolute path.

Definition at line 72 of file FileWriter.hpp.

73{
74 return resolve_write_path(std::vformat(pattern, std::make_format_args(frame)));
75}
std::string resolve_write_path(const std::string &filepath, std::string_view default_directory=Config::OUT_DIR)
Resolve a writable path against the configured output directory.

References resolve_write_path().

Referenced by MayaFlux::IO::VolumeCapture::capture_frame(), and save_spatial_snapshot().

Here is the call graph for this function:
Here is the caller graph for this function: