def __gather_base_color_factor(blender_material, export_settings):
    alpha_socket = gltf2_blender_get.get_socket(blender_material, 'Alpha')
    alpha = (alpha_socket.default_value if ((alpha_socket is not None) and (not alpha_socket.is_linked)) else 1.0)
    base_color_socket = gltf2_blender_get.get_socket(blender_material, 'Base Color')
    if (base_color_socket is None):
        base_color_socket = gltf2_blender_get.get_socket(blender_material, 'BaseColor')
    if (base_color_socket is None):
        base_color_socket = gltf2_blender_get.get_socket_old(blender_material, 'BaseColorFactor')
    if (base_color_socket is None):
        base_color_socket = gltf2_blender_get.get_socket(blender_material, 'Background')
    if (not isinstance(base_color_socket, bpy.types.NodeSocket)):
        return None
    if (not base_color_socket.is_linked):
        return (list(base_color_socket.default_value)[:3] + [alpha])
    texture_node = __get_tex_from_socket(base_color_socket)
    if (texture_node is None):
        return None

    def is_valid_multiply_node(node):
        return (isinstance(node, bpy.types.ShaderNodeMixRGB) and (node.blend_type == 'MULTIPLY') and (len(node.inputs) == 3))
    multiply_node = next((link.from_node for link in texture_node.path if is_valid_multiply_node(link.from_node)), None)
    if (multiply_node is None):
        return None

    def is_factor_socket(socket):
        return (isinstance(socket, bpy.types.NodeSocketColor) and ((not socket.is_linked) or (socket.links[0] not in texture_node.path)))
    factor_socket = next((socket for socket in multiply_node.inputs if is_factor_socket(socket)), None)
    if (factor_socket is None):
        return None
    if factor_socket.is_linked:
        print_console('WARNING', "BaseColorFactor only supports sockets without links (in Node '{}').".format(multiply_node.name))
        return None
    return (list(factor_socket.default_value)[:3] + [alpha])
def __gather_base_color_factor(blender_material, export_settings):
    alpha_socket = gltf2_blender_get.get_socket(blender_material, 'Alpha')
    alpha = (alpha_socket.default_value if ((alpha_socket is not None) and (not alpha_socket.is_linked)) else 1.0)
    base_color_socket = gltf2_blender_get.get_socket(blender_material, 'Base Color')
    if (base_color_socket is None):
        base_color_socket = gltf2_blender_get.get_socket(blender_material, 'BaseColor')
    if (base_color_socket is None):
        base_color_socket = gltf2_blender_get.get_socket_old(blender_material, 'BaseColorFactor')
    if (base_color_socket is None):
        base_color_socket = gltf2_blender_get.get_socket(blender_material, 'Background')
    if (not isinstance(base_color_socket, bpy.types.NodeSocket)):
        return None
    if (not base_color_socket.is_linked):
        return (list(base_color_socket.default_value)[:3] + [alpha])
    texture_node = __get_tex_from_socket(base_color_socket)
    if (texture_node is None):
        return None

    def is_valid_multiply_node(node):
        return (isinstance(node, bpy.types.ShaderNodeMixRGB) and (node.blend_type == 'MULTIPLY') and (len(node.inputs) == 3))
    multiply_node = next((link.from_node for link in texture_node.path if is_valid_multiply_node(link.from_node)), None)
    if (multiply_node is None):
        return None

    def is_factor_socket(socket):
        return (isinstance(socket, bpy.types.NodeSocketColor) and ((not socket.is_linked) or (socket.links[0] not in texture_node.path)))
    factor_socket = next((socket for socket in multiply_node.inputs if is_factor_socket(socket)), None)
    if (factor_socket is None):
        return None
    if factor_socket.is_linked:
        print_console('WARNING', "BaseColorFactor only supports sockets without links (in Node '{}').".format(multiply_node.name))
        return None
    return (list(factor_socket.default_value)[:3] + [alpha])