1) I prepared two objects for driving.
2) I copied the data path of the color property of diffuse shader in Suzanne's material node to drive the box.
nodes["Diffuse BSDF"].inputs[0].default_value
: failure
3) This time, I found the Data Api in the outliner, do copy data path, and created an index at the end of the path.
nodes["Diffuse BSDF"].inputs[0].default_value[0]
: failure
4) This time I copied the property values that are displayed in the info window.
bpy.data.node_groups["Shader Nodetree"].nodes["Diffuse BSDF"].inputs[0].default_value[0]
: failure
5) I found a solution to use the node_tree.
prefix via googling.
node_tree.nodes["Diffuse BSDF"].inputs[0].default_value[0]
: Eventually succeed
node_tree.nodes["Diffuse BSDF"].inputs[0].default_value[1]
: succeed
node_tree.nodes["Diffuse BSDF"].inputs[0].default_value[2]
: succeed
node_tree.nodes["Diffuse BSDF"].inputs[0].default_value[3]
: succeed
node_tree.nodes["Diffuse BSDF"].inputs[0].default_value.r
: succeed
node_tree.nodes["Diffuse BSDF"].inputs[0].default_value.g
: succeed
node_tree.nodes["Diffuse BSDF"].inputs[0].default_value.b
: succeed
node_tree.nodes["Diffuse BSDF"].inputs[0].default_value.a
: succeed
But I can't figure out what node_tree.
Is and where it comes from.
6) I want to figure out exactly the rules for dealing with data paths.
Thank you in advance.