3
11

New Addon: Import Autodesk .max #22

Closed
Sebastian Sille wants to merge 38 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 51a690e9cc - Show all commits

View File

@ -1244,7 +1244,7 @@ def get_color(colors, idx):
def get_value(colors, idx):
prop = get_property(colors, idx)
if (prop is not None):
siz = 15 if (len(prop.data) > 23) else 6
siz = 15 if (len(prop.data) > 19) else 6
val, offset = get_float(prop.data, siz)
return val
return None
@ -1273,10 +1273,9 @@ def get_vray_material(vry):
material = Material()
try:
material.set('diffuse', get_color(vry, 0x01))
material.set('ambient', get_color(vry, 0x02))
material.set('specular', get_color(vry, 0x05))
material.set('emissive', get_color(vry, 0x05))
material.set('shinines', get_value(vry, 0x0B))
material.set('specular', get_color(vry, 0x02))
material.set('reflect', get_value(vry, 0x04))
material.set('shinines', get_value(vry, 0x0A))
material.set('transparency', get_value(vry, 0x02))
except:
pass
@ -1287,10 +1286,9 @@ def get_arch_material(ad):
material = Material()
try:
material.set('diffuse', get_color(ad, 0x1A))
material.set('ambient', get_color(ad, 0x02))
material.set('specular', get_color(ad, 0x05))
material.set('emissive', get_color(ad, 0x05))
material.set('shinines', get_value(ad, 0x0B))
material.set('specular', get_color(ad, 0x02))
material.set('emissive', get_color(ad, 0x04))
material.set('shinines', get_value(ad, 0x0A))
material.set('transparency', get_value(ad, 0x02))
except:
pass