forked from bartvdbraak/blender
fix for lightwave object loader
This commit is contained in:
parent
450b3664e1
commit
04512c7306
@ -656,7 +656,12 @@ def read_clip(lwochunk, dir_part):
|
||||
# ima, IMAG, g_IMAG refers to clip dictionary 'ID' entries: refer to blok and surf
|
||||
clip_dict = {}
|
||||
data = cStringIO.StringIO(lwochunk.read())
|
||||
image_index, = struct.unpack(">L", data.read(4))
|
||||
data_str = data.read(4)
|
||||
if len(data_str) < 4: # can be zero also??? :/
|
||||
# Should not happen but lw can import so we should too
|
||||
return
|
||||
|
||||
image_index, = struct.unpack(">L", )
|
||||
clip_dict['ID'] = image_index
|
||||
i = 4
|
||||
while(i < lwochunk.chunksize):
|
||||
@ -1634,11 +1639,11 @@ def main():
|
||||
return
|
||||
|
||||
Blender.Window.FileSelector(read, "Import LWO", '*.lwo')
|
||||
|
||||
|
||||
if __name__=='__main__':
|
||||
main()
|
||||
|
||||
|
||||
# Cams debugging lwo loader
|
||||
"""
|
||||
TIME= Blender.sys.time()
|
||||
|
Loading…
Reference in New Issue
Block a user