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