Files
test2/source/blender/sequencer/SEQ_animation.hh
il4n 3e023fcf79 VSE: Slip keyframes with strip content
The "slip strip contents" operator in the VSE now can move the strip
keyframes. There is a property to enable keyframe slipping.
The property is disabled by default, mainly because animation is
often used for fade in/out, which would be annoying if it moved with
content.

Pull Request: https://projects.blender.org/blender/blender/pulls/136386
2025-03-25 21:24:07 +01:00

54 lines
1.5 KiB
C++

/* SPDX-FileCopyrightText: 2022 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
#pragma once
/** \file
* \ingroup sequencer
*/
#include "DNA_listBase.h"
#include "ANIM_action.hh"
struct ListBase;
struct Scene;
struct Strip;
struct SeqAnimationBackup;
namespace blender::seq {
bool animation_keyframes_exist(const Scene *scene);
bool animation_drivers_exist(Scene *scene);
void free_animdata(Scene *scene, Strip *strip);
void offset_animdata(const Scene *scene, Strip *strip, float ofs);
/**
* Return whether the fcurve targets the given sequence.
*/
bool fcurve_matches(const Strip &strip, const FCurve &fcurve);
struct AnimationBackup {
/* `curves` and `channelbag` here represent effectively the same data (the
* fcurves that animate the Scene that the sequence belongs to), just for
* legacy and layered actions, respectively. Therefore only one or the other
* should ever have data stored in them, never both. */
ListBase curves;
blender::animrig::Channelbag channelbag;
ListBase drivers;
};
/**
* Move all F-Curves and drivers from `scene` to `backup`.
*/
void animation_backup_original(Scene *scene, AnimationBackup *backup);
/**
* Move all F-Curves and drivers from `backup` to `scene`.
*/
void animation_restore_original(Scene *scene, AnimationBackup *backup);
/**
* Duplicate F-Curves and drivers used by `seq` from `backup` to `scene`.
*/
void animation_duplicate_backup_to_scene(Scene *scene, Strip *strip, AnimationBackup *backup);
} // namespace blender::seq