New Addon: Import Autodesk .max #105013
@ -671,7 +671,6 @@ class MaxChunk():
|
|||||||
self.unknown = True
|
self.unknown = True
|
||||||
self.format = None
|
self.format = None
|
||||||
self.data = None
|
self.data = None
|
||||||
self.resolved = False
|
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
if (self.unknown == True):
|
if (self.unknown == True):
|
||||||
@ -701,17 +700,6 @@ class ByteArrayChunk(MaxChunk):
|
|||||||
except:
|
except:
|
||||||
self.data = data
|
self.data = data
|
||||||
|
|
||||||
def set_le16_string(self, data):
|
|
||||||
try:
|
|
||||||
long, offset = get_long(data, 0)
|
|
||||||
self.data = data[offset:offset + l * 2].decode('utf-16-le')
|
|
||||||
if (self.data[-1] == b'\0'):
|
|
||||||
self.data = self.data[0:-1]
|
|
||||||
self.format = "LStr16"
|
|
||||||
self.unknown = False
|
|
||||||
except:
|
|
||||||
self.data = data
|
|
||||||
|
|
||||||
def set_data(self, data):
|
def set_data(self, data):
|
||||||
if (self.types in [0x0340, 0x4001, 0x0456, 0x0962]):
|
if (self.types in [0x0340, 0x4001, 0x0456, 0x0962]):
|
||||||
self.set_string(data)
|
self.set_string(data)
|
||||||
@ -1500,7 +1488,7 @@ def create_object(context, node, mscale, usemat, uvmesh, transform):
|
|||||||
created, uid = create_mesh(context, node, msh, mtx, mat, usemat, uvmesh)
|
created, uid = create_mesh(context, node, msh, mtx, mat, usemat, uvmesh)
|
||||||
|
|
||||||
|
|
||||||
def make_scene(context, mscale, usemat, uvmesh, transform, parent, level=0):
|
def make_scene(context, mscale, usemat, uvmesh, transform, parent):
|
||||||
for chunk in parent.children:
|
for chunk in parent.children:
|
||||||
if (isinstance(chunk, SceneChunk)):
|
if (isinstance(chunk, SceneChunk)):
|
||||||
if ((get_guid(chunk) == 0x01) and (get_super_id(chunk) == 0x01)):
|
if ((get_guid(chunk) == 0x01) and (get_super_id(chunk) == 0x01)):
|
||||||
@ -1513,7 +1501,7 @@ def make_scene(context, mscale, usemat, uvmesh, transform, parent, level=0):
|
|||||||
def read_scene(context, maxfile, filename, mscale, usemat, uvmesh, transform):
|
def read_scene(context, maxfile, filename, mscale, usemat, uvmesh, transform):
|
||||||
global SCENE_LIST
|
global SCENE_LIST
|
||||||
SCENE_LIST = read_chunks(maxfile, 'Scene', filename+'.Scn.bin', containerReader=SceneChunk)
|
SCENE_LIST = read_chunks(maxfile, 'Scene', filename+'.Scn.bin', containerReader=SceneChunk)
|
||||||
make_scene(context, mscale, usemat, uvmesh, transform, SCENE_LIST[0], 0)
|
make_scene(context, mscale, usemat, uvmesh, transform, SCENE_LIST[0])
|
||||||
|
|
||||||
|
|
||||||
def read(context, filename, mscale, usemat, uvmesh, transform):
|
def read(context, filename, mscale, usemat, uvmesh, transform):
|
||||||
|
Loading…
Reference in New Issue
Block a user