ddg.blender.animation module
- ddg.blender.animation.set_keyframe(bpy_struct: Any, frame: int, property_name: str, value: Any, action_group: str = '') bool[source]
Add a keyframe value a frame to a property of a bpy_struct.
- Parameters:
- bpy_structA Blender bpy_struct object which properties to animate.
- frameAn Integer.
The frame at which the value will get inserted.
- property_nameA String representing the name of property to change.
- valueAny value the property should get at this frame.
- action_groupA String.
Name of the ActionGroup the F-Curve of the animation should be added to.
- Returns:
- True if the keyframe was set successfully, else False.
- ddg.blender.animation.animate_property(bpy_struct: Any, property_name: str, frames: Sequence[int], values: Sequence[Any], action_group: str = '') bool[source]
Add keyframes to a property of a bpy_struct.
- Parameters:
- bpy_structA Blender bpy_struct object which properties to animate.
- framesA Sequence of integers.
Correspond to the frames at which the values will get inserted.
- valuesA Sequence.
The values the property should take for each corresponding frame.
- action_groupA String.
Name of the ActionGroup the F-Curve of the animation should be added to.
- Returns:
- True if all keyframes were set successfully, else False.
- ddg.blender.animation.animate_properties(bpy_struct: Any, frames: Sequence[int], animation: Dict[str, Sequence[Any]], action_group: str = '') bool[source]
Add keyframes to multiple properties of a bpy_struct. For each frame in frames, each property from bpy_struct listed in the keys of animation gets assigned a value corresponding to that frame.
- Parameters:
- bpy_structA Blender bpy_struct object which properties to animate.
- framesA Sequence of integers.
Correspond to the frames at which the values will get inserted.
- animationDict[str, Sequence[Any]].
Associates a property_name to a sequence of values.
- action_groupA String.
Name of the ActionGroup the F-Curve of the animation should be added to.
- Returns:
- True if all keyframes were set successfully, else False.
- ddg.blender.animation.animate_opacity(material, fade_in_start, fade_in_stop, fade_out_start, fade_out_stop, opacity_outer=0, opacity_inner=1)[source]
Animate the transparency/opacity of a BSDF material
- Parameters:
- material: bpy.types.Material using a BSDF Node.
Material for which the transparency will be animated.
- fade_in_start: int
Frame of the start of the fade-in of the opacity.
- fade_in_stop: int
Frame of the end of the fade-in of the opacity.
- fade_out_start: int
Frame of the start of the fade-out of the opacity.
- fade_out_stop: int
Frame of the end of the fade-out of the opacity.
- value_outer: float between 0 and 1 (default=0)
Value of the opacity after fade-in and before fade-out.
- value_inner: float between 0 and 1 (defaul=1)
Value of the opacity before fade-in and after fade-out.
See also
ddg.blender.material.transparent_material