Object color keyframe through python

I would like to put a keyframe in object color channel via Python.

Anyone know if is possible to do that?


this is the script I made and works for me (Iā€™m newbie on python script)

import bpy

alpha = (1,1,1,0) #set alpha color for transparency
white = (1,1,1,1) #set white color for show the object
f1 = 0 #set the frame number

bpy.context.scene.objects.active = bpy.data.objects["object_name"] #active the object that you want to set the object color
bpy.context.object.active_material.use_object_color = True #active the object color option
bpy.context.scene.frame_set(frame=f1) #set the frame
bpy.context.object.color = white #set the value of the object color
bpy.context.object.keyframe_insert(data_path="color") #insert the frame for the object color

1 Like