keyframe_property
Key any animatable property—material colors, light power, world strength, modifier settings, camera lens—at a chosen frame and optionally set its value first to animate changes in one call.
Instructions
Keyframe any animatable property: material colours, light power, world strength, modifier settings, camera lens and more.
Optionally sets the value first, so "turn red at frame 24" is one call. For location, rotation and scale, insert_keyframe is simpler.
Args: data_path: Property path from the target, e.g. 'active_material.node_tree.nodes["Principled BSDF"].inputs["Base Color"].default_value', "data.energy" (light power), "data.lens" (camera), 'modifiers["Bend"].angle', 'node_tree.nodes["Background"].inputs["Strength"].default_value' (with target WORLD). frame: Frame to key. value: Value to set before keying: a number, true/false, or a list for colours and vectors. Omit to key the current value. object_name: The object the path starts from (target OBJECT). target: OBJECT, WORLD (the scene's world) or SCENE. index: One component of a vector or colour (0, 1, 2, 3), or -1 for all.
Returns: Dict with the data block keyed, its path, the frame and the value.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| frame | Yes | ||
| index | No | ||
| value | No | ||
| target | No | OBJECT | |
| data_path | Yes | ||
| object_name | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||