We've had a bunch of inconsistency between `channel_bag` and `channelbag` in the code base. After discussion with @dr.sybren, we decided to standardize on `channelbag` and also rename the camelcase `ChannelBag` to `Channelbag` to be consistent with that. This PR implements those changes. Note that the reason we standardized on `channelbag` rather than `channel_bag` is because it makes things clearer when stringing multiple terms together in type and function names. For example, in `channelbag_fcurves_move()` it makes it clear that `channelbag` describes one thing, rather than `channel` and `bag` being two separate things. No functional changes intended. Pull Request: https://projects.blender.org/blender/blender/pulls/130988
53 lines
1.6 KiB
C++
53 lines
1.6 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"
|
|
#include "ANIM_action_legacy.hh"
|
|
|
|
struct ListBase;
|
|
struct Scene;
|
|
struct Sequence;
|
|
struct SeqAnimationBackup;
|
|
|
|
bool SEQ_animation_keyframes_exist(Scene *scene);
|
|
bool SEQ_animation_drivers_exist(Scene *scene);
|
|
void SEQ_free_animdata(Scene *scene, Sequence *seq);
|
|
void SEQ_offset_animdata(Scene *scene, Sequence *seq, int ofs);
|
|
/**
|
|
* Return whether the fcurve targets the given sequence.
|
|
*/
|
|
bool SEQ_fcurve_matches(const Sequence &seq, const FCurve &fcurve);
|
|
struct SeqAnimationBackup {
|
|
/* `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 SEQ_animation_backup_original(Scene *scene, SeqAnimationBackup *backup);
|
|
/**
|
|
* Move all F-Curves and drivers from `backup` to `scene`.
|
|
*/
|
|
void SEQ_animation_restore_original(Scene *scene, SeqAnimationBackup *backup);
|
|
/**
|
|
* Duplicate F-Curves and drivers used by `seq` from `backup` to `scene`.
|
|
*/
|
|
void SEQ_animation_duplicate_backup_to_scene(Scene *scene,
|
|
Sequence *seq,
|
|
SeqAnimationBackup *backup);
|