Open a file for reading.
- Parameters
-
| filepath | Path to the file. |
| options | Reading options (see FileReadOptions). |
- Returns
- true if file was successfully opened.
Implements MayaFlux::IO::FileReader.
Definition at line 328 of file VolumeReader.cpp.
329{
331
333 set_error(
"Unsupported volume format: " + filepath);
336 return false;
337 }
338
340
344 "VolumeReader: open failed for '{}' — {}", filepath,
m_last_error);
345 return false;
346 }
347
350
352 "VolumeReader: opened '{}' — {} grid(s)",
353 std::filesystem::path(resolved).filename().string(),
355
356 return true;
357}
#define MF_INFO(comp, ctx,...)
#define MF_ERROR(comp, ctx,...)
static std::string resolve_path(const std::string &filepath)
Resolve a filepath against the project source root if not found as-is.
void set_error(std::string msg) const
std::unique_ptr< Detail::VDBArchive > m_archive
bool can_read(const std::string &filepath) const override
Check if a file can be read by this reader.
void close() override
Close the currently open file.
@ FileIO
Filesystem I/O operations.
@ IO
Networking, file handling, streaming.
References can_read(), close(), MayaFlux::Journal::FileIO, MayaFlux::Journal::IO, m_archive, m_filepath, m_is_open, m_last_error, MF_ERROR, MF_INFO, MayaFlux::IO::FileReader::resolve_path(), and set_error().
Referenced by load(), and load().