Node Wrangler: create world output if the node tree is of type world
When using the node.nw_link_out operator (O key) in a world node tree, a material output would be created instead of a world one.
This commit is contained in:
parent
67273f17e8
commit
ebe0bd5677
|
@ -3777,7 +3777,10 @@ class NWLinkToOutputNode(Operator):
|
|||
if not output_node:
|
||||
bpy.ops.node.select_all(action="DESELECT")
|
||||
if tree_type == 'ShaderNodeTree':
|
||||
output_node = nodes.new('ShaderNodeOutputMaterial')
|
||||
if context.space_data.shader_type == 'OBJECT':
|
||||
output_node = nodes.new('ShaderNodeOutputMaterial')
|
||||
elif context.space_data.shader_type == 'WORLD':
|
||||
output_node = nodes.new('ShaderNodeOutputWorld')
|
||||
elif tree_type == 'CompositorNodeTree':
|
||||
output_node = nodes.new('CompositorNodeComposite')
|
||||
elif tree_type == 'TextureNodeTree':
|
||||
|
|
Loading…
Reference in New Issue