Merge pull request #1212 from manongjohn/fix_svg_sequence_loading
Fix SVG sequence file loading
This commit is contained in:
commit
580fc67bdc
|
@ -75,7 +75,7 @@ void initImageIo(bool lightVersion) {
|
|||
TFileType::declare("pli", TFileType::VECTOR_LEVEL);
|
||||
|
||||
TLevelReader::define("svg", 0, TLevelReaderSvg::create);
|
||||
TFileType::declare("svg", TFileType::VECTOR_LEVEL);
|
||||
TFileType::declare("svg", TFileType::VECTOR_IMAGE);
|
||||
TLevelWriter::define("svg", TLevelWriterSvg::create, false);
|
||||
Tiio::defineWriterProperties("svg", new Tiio::SvgWriterProperties());
|
||||
|
||||
|
|
|
@ -293,6 +293,10 @@ inline bool isMultipleFrameType(const TFilePath &fp) {
|
|||
|
||||
inline bool doesSupportRandomAccess(const TFilePath &fp,
|
||||
bool isToonzOutput = false) {
|
||||
const std::string &type = fp.getType();
|
||||
|
||||
if (type == "pli") return false;
|
||||
|
||||
return (fp.getDots() == "..");
|
||||
}
|
||||
|
||||
|
|
|
@ -25,6 +25,9 @@ namespace {
|
|||
|
||||
inline bool supportsRandomAccess(const TFilePath &fp) {
|
||||
const std::string &type = fp.getType();
|
||||
|
||||
if (type == "pli") return false;
|
||||
|
||||
return type == "tlv" || // TLVs do support random access
|
||||
fp.getDots() == ".."; // Multi-file levels of course do
|
||||
}
|
||||
|
|
|
@ -1002,6 +1002,7 @@ static LevelType getLevelType(const TFilePath &fp) {
|
|||
ret.m_ltype = OVL_XSHLEVEL;
|
||||
break;
|
||||
|
||||
case TFileType::VECTOR_IMAGE:
|
||||
case TFileType::VECTOR_LEVEL:
|
||||
if (format == "svg") {
|
||||
ret.m_vectorNotPli = true;
|
||||
|
|
Loading…
Reference in a new issue