2020-12-19 06:44:57 +01:00
|
|
|
/*
|
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program; if not, write to the Free Software Foundation,
|
|
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
|
*
|
|
|
|
|
* The Original Code is Copyright (C) 2004 Blender Foundation.
|
|
|
|
|
* All rights reserved.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
/** \file
|
|
|
|
|
* \ingroup sequencer
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
2021-01-04 12:03:34 +11:00
|
|
|
struct ListBase;
|
|
|
|
|
struct Main;
|
2020-12-19 06:44:57 +01:00
|
|
|
struct Scene;
|
|
|
|
|
struct Sequence;
|
|
|
|
|
|
|
|
|
|
int SEQ_edit_sequence_swap(struct Sequence *seq_a, struct Sequence *seq_b, const char **error_str);
|
2021-12-08 21:02:29 +11:00
|
|
|
/**
|
|
|
|
|
* Move sequence to seqbase.
|
|
|
|
|
*
|
|
|
|
|
* \param scene: Scene containing the editing
|
2021-12-14 18:35:23 +11:00
|
|
|
* \param seqbase: seqbase where `seq` is located
|
2021-12-08 21:02:29 +11:00
|
|
|
* \param seq: Sequence to move
|
|
|
|
|
* \param dst_seqbase: Target seqbase
|
|
|
|
|
*/
|
2021-11-18 03:51:36 +01:00
|
|
|
bool SEQ_edit_move_strip_to_seqbase(struct Scene *scene,
|
|
|
|
|
ListBase *seqbase,
|
2021-12-14 18:35:23 +11:00
|
|
|
struct Sequence *seq,
|
2021-11-18 03:51:36 +01:00
|
|
|
ListBase *dst_seqbase);
|
2021-12-08 21:02:29 +11:00
|
|
|
/**
|
|
|
|
|
* Move sequence to meta sequence.
|
|
|
|
|
*
|
|
|
|
|
* \param scene: Scene containing the editing
|
|
|
|
|
* \param src_seq: Sequence to move
|
|
|
|
|
* \param dst_seqm: Target Meta sequence
|
|
|
|
|
* \param error_str: Error message
|
|
|
|
|
*/
|
2021-03-23 10:49:48 +01:00
|
|
|
bool SEQ_edit_move_strip_to_meta(struct Scene *scene,
|
|
|
|
|
struct Sequence *src_seq,
|
|
|
|
|
struct Sequence *dst_seqm,
|
|
|
|
|
const char **error_str);
|
2021-11-18 03:51:36 +01:00
|
|
|
bool SEQ_meta_separate(struct Scene *scene, struct Sequence *src_meta, const char **error_str);
|
2021-12-08 21:02:29 +11:00
|
|
|
/**
|
|
|
|
|
* Flag seq and its users (effects) for removal.
|
|
|
|
|
*/
|
2020-12-19 06:44:57 +01:00
|
|
|
void SEQ_edit_flag_for_removal(struct Scene *scene,
|
|
|
|
|
struct ListBase *seqbase,
|
|
|
|
|
struct Sequence *seq);
|
2021-12-08 21:02:29 +11:00
|
|
|
/**
|
|
|
|
|
* Remove all flagged sequences, return true if sequence is removed.
|
|
|
|
|
*/
|
2020-12-19 06:44:57 +01:00
|
|
|
void SEQ_edit_remove_flagged_sequences(struct Scene *scene, struct ListBase *seqbase);
|
|
|
|
|
void SEQ_edit_update_muting(struct Editing *ed);
|
|
|
|
|
|
|
|
|
|
typedef enum eSeqSplitMethod {
|
|
|
|
|
SEQ_SPLIT_SOFT,
|
|
|
|
|
SEQ_SPLIT_HARD,
|
|
|
|
|
} eSeqSplitMethod;
|
|
|
|
|
|
2021-12-08 21:02:29 +11:00
|
|
|
/**
|
|
|
|
|
* Split Sequence at timeline_frame in two.
|
|
|
|
|
*
|
|
|
|
|
* \param bmain: Main in which Sequence is located
|
|
|
|
|
* \param scene: Scene in which Sequence is located
|
|
|
|
|
* \param seqbase: ListBase in which Sequence is located
|
|
|
|
|
* \param seq: Sequence to be split
|
|
|
|
|
* \param timeline_frame: frame at which seq is split.
|
|
|
|
|
* \param method: affects type of offset to be applied to resize Sequence
|
|
|
|
|
* \return The newly created sequence strip. This is always Sequence on right side.
|
|
|
|
|
*/
|
2020-12-19 06:44:57 +01:00
|
|
|
struct Sequence *SEQ_edit_strip_split(struct Main *bmain,
|
|
|
|
|
struct Scene *scene,
|
|
|
|
|
struct ListBase *seqbase,
|
|
|
|
|
struct Sequence *seq,
|
2022-01-07 11:38:08 +11:00
|
|
|
int timeline_frame,
|
|
|
|
|
eSeqSplitMethod method,
|
2021-08-24 00:52:24 +02:00
|
|
|
const char **r_error);
|
2021-12-08 21:02:29 +11:00
|
|
|
/**
|
|
|
|
|
* Find gap after initial_frame and move strips on right side to close the gap
|
|
|
|
|
*
|
|
|
|
|
* \param scene: Scene in which strips are located
|
|
|
|
|
* \param seqbase: ListBase in which strips are located
|
|
|
|
|
* \param initial_frame: frame on timeline from where gaps are searched for
|
|
|
|
|
* \param remove_all_gaps: remove all gaps instead of one gap
|
|
|
|
|
* \return true if gap is removed, otherwise false
|
|
|
|
|
*/
|
2020-12-19 06:44:57 +01:00
|
|
|
bool SEQ_edit_remove_gaps(struct Scene *scene,
|
|
|
|
|
struct ListBase *seqbase,
|
2022-01-07 11:38:08 +11:00
|
|
|
int initial_frame,
|
|
|
|
|
bool remove_all_gaps);
|
2021-06-16 00:29:17 +02:00
|
|
|
void SEQ_edit_sequence_name_set(struct Scene *scene, struct Sequence *seq, const char *new_name);
|
|
|
|
|
|
2020-12-19 06:44:57 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|