Animation nodes: bake Cycles Material Output to keyframes - possible? In an older Question I found an answer, what is possible to bake with AN.
One in the list was: Cycles Matrial Output (2 Years ago)
Link: Animation nodes bake to keyframes not working with polygon decomposed offsets
I’ve a Plane with Emission-Node as Material, which changes Color and Strength randomly over time.

When I try to Set Keyframes, there is a problem (I believe):
In Set Keyframes-Node you need an object for reference to the data-path (custom-channel), but the material-datapath is not linked to a specific object (bpy.data.materials[&quot;feuerlicht&quot;].node_tree.nodes[&quot;Emission&quot;].inputs[1].default_value).
Set Keyframes node tells me

Could not set keyframe

And when I look to python code, it seems, that I need an object for keyframe-setting:
obj.keyframe_insert('location', frame=1)
Or, as I found:
material.node_tree.keyframe_insert(datapath, frame=1)
But the material is not a separate object I can choose in then set keyframe-node, or?
I changed from Area-light to this plane-emission-thing to get it baked, I thought.
Is it possible to get Cycles-Material-changes baked to keyframes in AN?
After further search I think there is no node for this.
Now I did it with a quick an dirty script-node:
    # inputs:
# Enable = boolean
# SetKeyframes = boolean
# RemoveUnwanted = boolean
# MaterialName = text
# pframe = integer

import bpy

mat = None

if Enable:
    for tmat in bpy.data.materials:
        if tmat.name == MaterialName:
            mat = tmat
    if mat != None:
        print ('material found')
        emitStr = mat.node_tree.nodes['Emission'].inputs[1]
        if RemoveUnwanted:
            try:
                emitStr.keyframe_delete( 'default_value', frame=pframe)
            except:
                None
        if SetKeyframes:
            emitStr.keyframe_insert( 'default_value', frame=pframe)
            
    else:
        print ('material '+MaterialName+' not found')
        return