forked from blender/blender-addons
BLEN-358: Error in console after closing Blender #4
@ -238,7 +238,7 @@ class ShaderNodeMixShader(NodeParser):
|
||||
if shader1_type not in input_types:
|
||||
log.warn(f'Node {self.node.bl_idname} ({self.material.name_full}) ignored. '
|
||||
f'Input type must be of types {input_types}, actual: {shader1_type}')
|
||||
return None
|
||||
return shader1
|
||||
|
||||
mix = self.create_node('mix', shader1_type.lower(), prefix='PBR', inputs={
|
||||
'fg': shader1,
|
||||
@ -250,7 +250,7 @@ class ShaderNodeMixShader(NodeParser):
|
||||
if shader2_type not in input_types:
|
||||
log.warn(f'Node {self.node.bl_idname} ({self.material.name_full}) ignored. '
|
||||
f'Input type must be of types {input_types}, actual: {shader2_type}')
|
||||
return None
|
||||
return shader2
|
||||
|
||||
mix = self.create_node('mix', shader2_type.lower(), prefix='PBR', inputs={
|
||||
'bg': shader2,
|
||||
@ -264,12 +264,12 @@ class ShaderNodeMixShader(NodeParser):
|
||||
log.warn(f'Types of input shaders must be the same. '
|
||||
f'First shader type: {shader1_type}, second shader type: {shader2_type}')
|
||||
|
||||
return None
|
||||
return shader1
|
||||
|
||||
if shader1_type not in input_types:
|
||||
log.warn(f'Node {self.node.bl_idname} ({self.material.name_full}) ignored. '
|
||||
f'Input type must be of types {input_types}, actual: {shader1_type}, {shader2_type}')
|
||||
return None
|
||||
return shader1
|
||||
|
||||
mix = self.create_node('mix', shader1_type.lower(), prefix='PBR', inputs={
|
||||
'fg': shader1,
|
||||
@ -306,7 +306,7 @@ class ShaderNodeAddShader(NodeParser):
|
||||
if shader1_type not in input_types:
|
||||
log.warn(f'Node {self.node.bl_idname} ({self.material.name_full}) ignored. '
|
||||
f'Input type must be of types {input_types}, actual: {shader1_type}')
|
||||
return None
|
||||
return shader1
|
||||
|
||||
add = self.create_node('add', shader1_type.lower(), prefix='PBR', inputs={
|
||||
'in1': shader1
|
||||
@ -317,7 +317,7 @@ class ShaderNodeAddShader(NodeParser):
|
||||
if shader2_type not in input_types:
|
||||
log.warn(f'Node {self.node.bl_idname} ({self.material.name_full}) ignored. '
|
||||
f'Input type must be of types {input_types}, actual: {shader2_type}')
|
||||
return None
|
||||
return shader2
|
||||
|
||||
add = self.create_node('add', shader2_type.lower(), prefix='PBR', inputs={
|
||||
'in2': shader2
|
||||
@ -330,12 +330,12 @@ class ShaderNodeAddShader(NodeParser):
|
||||
log.warn(f'Types of input shaders must be the same. '
|
||||
f'First shader type: {shader1_type}, second shader type: {shader2_type}')
|
||||
|
||||
return None
|
||||
return shader1
|
||||
|
||||
if shader1_type not in input_types:
|
||||
log.warn(f'Node {self.node.bl_idname} ({self.material.name_full}) ignored. '
|
||||
f'Input type must be of types {input_types}, actual: {shader1_type}, {shader2_type}')
|
||||
return None
|
||||
return shader1
|
||||
|
||||
add = self.create_node('add', shader1_type.lower(), prefix='PBR', inputs={
|
||||
'in1': shader1,
|
||||
|
Loading…
Reference in New Issue
Block a user