Fix #103912: Node wrangler adds legacy mix nodes #104425
@ -2020,7 +2020,7 @@ class NWMergeNodes(Operator, NWBase):
|
||||
mode = 'MIX'
|
||||
if (merge_type != 'MATH' and merge_type != 'GEOMETRY') and tree_type == 'GEOMETRY':
|
||||
merge_type = 'AUTO'
|
||||
# The MixRGB node and math nodes used for geometry nodes are of type 'ShaderNode'
|
||||
# The Mix node and math nodes used for geometry nodes are of type 'ShaderNode'
|
||||
if (merge_type == 'MATH' or merge_type == 'MIX') and tree_type == 'GEOMETRY':
|
||||
node_type = 'ShaderNode'
|
||||
selected_mix = [] # entry = [index, loc]
|
||||
@ -2119,8 +2119,13 @@ class NWMergeNodes(Operator, NWBase):
|
||||
was_multi = False
|
||||
for i in range(the_range):
|
||||
if nodes_list == selected_mix:
|
||||
add_type = node_type + 'MixRGB'
|
||||
mix_name = 'Mix'
|
||||
if tree_type == 'COMPOSITING':
|
||||
mix_name = 'MixRGB'
|
||||
add_type = node_type + mix_name
|
||||
add = nodes.new(add_type)
|
||||
if tree_type != 'COMPOSITING':
|
||||
add.data_type = 'RGBA'
|
||||
add.blend_type = mode
|
||||
if mode != 'MIX':
|
||||
add.inputs[0].default_value = 1.0
|
||||
@ -2128,6 +2133,9 @@ class NWMergeNodes(Operator, NWBase):
|
||||
add.hide = do_hide
|
||||
if do_hide:
|
||||
loc_y = loc_y - 50
|
||||
first = 6
|
||||
second = 7
|
||||
if tree_type == 'COMPOSITING':
|
||||
first = 1
|
||||
second = 2
|
||||
add.width_hidden = 100.0
|
||||
|
Loading…
Reference in New Issue
Block a user