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 291b2517a9 - Show all commits

View File

@ -739,15 +739,15 @@ def process_next_chunk(context, file, previous_chunk, imported_objects, CONSTRAI
context.scene.world = contextWorld context.scene.world = contextWorld
else: else:
contextWorld.use_nodes = True contextWorld.use_nodes = True
links = newWorld.node_tree.links links = contextWorld.node_tree.links
nodes = newWorld.node_tree.nodes nodes = contextWorld.node_tree.nodes
context.view_layer.use_pass_mist = False context.view_layer.use_pass_mist = False
layerfog = nodes.new(type='ShaderNodeVolumeScatter') layerfog = nodes.new(type='ShaderNodeVolumeScatter')
layerfog.label = "Layer Fog" layerfog.label = "Layer Fog"
layerfog.location = (300, 100) layerfog.location = (300, 100)
links.new(layerfog.outputs['Volume'], nodes['World Output'].inputs['Volume']) links.new(layerfog.outputs['Volume'], nodes['World Output'].inputs['Volume'])
world.mist_settings.start = read_float(new_chunk) contextWorld.mist_settings.start = read_float(new_chunk)
world.mist_settings.depth = read_float(new_chunk) contextWorld.mist_settings.depth = read_float(new_chunk)
layerfog.inputs[1].default_value = read_float(new_chunk) layerfog.inputs[1].default_value = read_float(new_chunk)
layerfogflag = read_long(new_chunk) layerfogflag = read_long(new_chunk)
read_chunk(file, temp_chunk) read_chunk(file, temp_chunk)