New Addon: Import Autodesk .max #105013
@ -223,7 +223,8 @@ SKIPPABLE = {
|
||||
|
||||
|
||||
def get_valid_name(name):
|
||||
if (INVALID_NAME.match(name)): return "_%s"%(name.encode('utf8'))
|
||||
if (INVALID_NAME.match(name)):
|
||||
return "_%s"%(name.encode('utf8'))
|
||||
return "%s"%(name.encode('utf8'))
|
||||
|
||||
def i8(data):
|
||||
@ -1047,7 +1048,6 @@ def get_reference(chunk):
|
||||
references = {}
|
||||
refs = chunk.get_first(0x2035)
|
||||
if (refs):
|
||||
types = refs.data[0]
|
||||
offset = 1
|
||||
while offset < len(refs.data):
|
||||
key = refs.data[offset]
|
||||
@ -1466,7 +1466,6 @@ def get_poly_data(chunk):
|
||||
|
||||
def create_editable_poly(context, node, msh, mat, mtx, umt, uvm):
|
||||
coords = point4i = point6i = pointNi = None
|
||||
name = node.get_first(TYP_NAME).data
|
||||
poly = msh.get_first(0x08FE)
|
||||
created = False
|
||||
lidx = []
|
||||
@ -1508,7 +1507,6 @@ def create_editable_poly(context, node, msh, mat, mtx, umt, uvm):
|
||||
|
||||
|
||||
def create_editable_mesh(context, node, msh, mat, mtx, umt):
|
||||
name = node.get_first(TYP_NAME).data
|
||||
poly = msh.get_first(0x08FE)
|
||||
created = False
|
||||
if (poly):
|
||||
@ -1520,10 +1518,12 @@ def create_editable_mesh(context, node, msh, mat, mtx, umt):
|
||||
return created
|
||||
|
||||
|
||||
def create_shell(context, node, shell, mat, mtx, umt):
|
||||
name = node.get_first(TYP_NAME).data
|
||||
def create_shell(context, node, shell, mat, mtx, umt, uvm):
|
||||
refs = get_references(shell)
|
||||
msh = refs[-1]
|
||||
if (get_class_name(msh) == "'Editable Poly'"):
|
||||
created = create_editable_poly(context, node, msh, mat, mtx, umt, uvm)
|
||||
else:
|
||||
created = create_editable_mesh(context, node, msh, mat, mtx, umt)
|
||||
return created
|
||||
|
||||
@ -1543,7 +1543,7 @@ def create_mesh(context, node, msh, mtx, mat, umt, uvm):
|
||||
elif (uid == 0x192F60981BF8338D):
|
||||
created = create_editable_poly(context, node, msh, mat, mtx, umt, uvm)
|
||||
elif (uid in {0x2032, 0x2033}):
|
||||
created = create_shell(context, node, msh, mat, mtx, umt)
|
||||
created = create_shell(context, node, msh, mat, mtx, umt, uvm)
|
||||
else:
|
||||
skip = SKIPPABLE.get(uid)
|
||||
if (skip is not None):
|
||||
|
Loading…
Reference in New Issue
Block a user