Commit 9f204083 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

RF: Make vest loader a bit more lenient

parent 2aa93074
......@@ -22,7 +22,16 @@ def looksLikeVestLutFile(path):
``False`` otherwise.
"""
with open(path, 'rt') as f:
return f.readline().strip() == '%!VEST-LUT'
lines = []
for i in range(10):
line = f.readline()
if line is None: break
else: lines.append(line.strip())
validHeaders = ('%!VEST-LUT', '%BeginInstance', '%%BeginInstance')
return len(lines) > 0 and lines[0] in validHeaders
def loadVestLutFile(path, normalise=True):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment