forked from bartvdbraak/blender
Small speedup for blend_render_info.py
Do not close and re-open the file in case it's compressed, gzip module can now directly take a file object as parameter. Differential Revision: https://developer.blender.org/D2235
This commit is contained in:
parent
075a2175d5
commit
87c08fa681
@ -42,8 +42,8 @@ def read_blend_rend_chunk(path):
|
||||
|
||||
if head[0:2] == b'\x1f\x8b': # gzip magic
|
||||
import gzip
|
||||
blendfile.close()
|
||||
blendfile = gzip.open(path, "rb")
|
||||
blendfile.seek(0)
|
||||
blendfile = gzip.open(blendfile, "rb")
|
||||
head = blendfile.read(7)
|
||||
|
||||
if head != b'BLENDER':
|
||||
|
Loading…
Reference in New Issue
Block a user