Greetings. I’ve been working with Blender scripting for a few days now. I’m familiar with Python and have been getting more used to working with it in Blender. However regardless of what I search I cannot find more of a direct answer on the issue I am encountering. Now I know that there have been some changes in functions since Blender 2.8, but I am trying to assign a color change on my diffuse node to a key frame.
I have tried:
obj = bpy.data.objects['Cube'] node = obj.active_material.node_tree.nodes["Diffuse BSDF"].default_value <-- I know 'node' needs to be in quotes, but Ive tried both quotes and no quotes. To ensure the data_path is correct, I copied the data path by right- clicking my diffuse color and choosing 'copy data path'---> obj.keyframe_insert(data_path=node, frame=0)
I know I need to change the color first, but I cannot get the key frame to insert. I get an error showing node (the actual string output) “default_value” is not found.
I am trying to set a key frame on color change, but obj.diffuse_color (not the actual command, I know) only changes the color of the object in the viewport display. I’ve tried to get my command to recognized ‘use_object_color = True’, but nothing autocompletes to this.