New Addon: Import Autodesk .max #105013

Closed
Sebastian Sille wants to merge 136 commits from (deleted):nrgsille-import_max into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Showing only changes of commit 26b8a21af4 - Show all commits

View File

@ -770,11 +770,11 @@ def make_material_chunk(material, image):
mix_primary = link.from_node if link.from_node.type == 'TEX_IMAGE' and link.to_node.type in mtype else False mix_primary = link.from_node if link.from_node.type == 'TEX_IMAGE' and link.to_node.type in mtype else False
mix_secondary = link.from_node if link.from_node.type == 'TEX_IMAGE' and link.to_socket.identifier in {'Color1', 'A_Color'} else False mix_secondary = link.from_node if link.from_node.type == 'TEX_IMAGE' and link.to_socket.identifier in {'Color1', 'A_Color'} else False
if mix_secondary: if mix_secondary:
matmap = make_uv_texture_chunk(MAT_TEXMAP, [mix_secondary], pct) matmap = make_texture_chunk(MAT_TEXMAP, [mix_secondary], pct)
elif mix_primary: elif mix_primary:
diffuse.append(mix_primary) diffuse.append(mix_primary)
if diffuse: if diffuse:
material_chunk.add_subchunk(make_uv_texture_chunk(MAT_DIFFUSEMAP, diffuse, pct)) material_chunk.add_subchunk(make_texture_chunk(MAT_DIFFUSEMAP, diffuse, pct))
primary_tex = True primary_tex = True
if primary_tex and matmap: if primary_tex and matmap:
material_chunk.add_subchunk(matmap) material_chunk.add_subchunk(matmap)