2011-02-18 13:05:18 +00:00
|
|
|
/*
|
2008-12-15 05:21:44 +00: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
|
2011-11-29 10:54:47 +00:00
|
|
|
* of the License, or (at your option) any later version.
|
2008-12-15 05:21:44 +00:00
|
|
|
*
|
|
|
|
* 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,
|
2010-02-12 13:34:04 +00:00
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2008-12-15 05:21:44 +00:00
|
|
|
*
|
|
|
|
* The Original Code is Copyright (C) 2004 Blender Foundation.
|
|
|
|
* All rights reserved.
|
|
|
|
*/
|
|
|
|
|
2012-02-17 18:59:41 +00:00
|
|
|
#pragma once
|
2008-12-15 05:21:44 +00:00
|
|
|
|
2019-02-18 08:08:12 +11:00
|
|
|
/** \file
|
2020-10-26 00:47:06 +01:00
|
|
|
* \ingroup sequencer
|
2011-02-18 13:05:18 +00:00
|
|
|
*/
|
|
|
|
|
2019-11-29 11:42:18 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2020-12-19 06:44:57 +01:00
|
|
|
#include "DNA_scene_types.h"
|
|
|
|
|
2008-12-15 05:21:44 +00:00
|
|
|
struct Editing;
|
2010-08-13 14:23:44 +00:00
|
|
|
struct Scene;
|
2008-12-15 05:21:44 +00:00
|
|
|
struct Sequence;
|
2021-01-04 12:03:34 +11:00
|
|
|
struct SequencerToolSettings;
|
2012-02-29 12:08:26 +00:00
|
|
|
|
2020-10-26 00:47:06 +01:00
|
|
|
/* RNA enums, just to be more readable */
|
|
|
|
enum {
|
2020-11-19 12:59:29 +01:00
|
|
|
SEQ_SIDE_MOUSE = -1,
|
2020-10-26 00:47:06 +01:00
|
|
|
SEQ_SIDE_NONE = 0,
|
|
|
|
SEQ_SIDE_LEFT,
|
|
|
|
SEQ_SIDE_RIGHT,
|
|
|
|
SEQ_SIDE_BOTH,
|
|
|
|
SEQ_SIDE_NO_CHANGE,
|
|
|
|
};
|
|
|
|
|
2020-12-19 06:44:57 +01:00
|
|
|
/* seq_dupli' flags */
|
|
|
|
#define SEQ_DUPE_UNIQUE_NAME (1 << 0)
|
|
|
|
#define SEQ_DUPE_ALL (1 << 3) /* otherwise only selected are copied */
|
|
|
|
#define SEQ_DUPE_IS_RECURSIVE_CALL (1 << 4)
|
2020-11-05 13:33:27 +01:00
|
|
|
|
2020-12-16 20:34:26 +01:00
|
|
|
struct SequencerToolSettings *SEQ_tool_settings_init(void);
|
2021-05-25 15:02:31 +02:00
|
|
|
struct SequencerToolSettings *SEQ_tool_settings_ensure(struct Scene *scene);
|
2020-12-16 20:34:26 +01:00
|
|
|
void SEQ_tool_settings_free(struct SequencerToolSettings *tool_settings);
|
|
|
|
eSeqImageFitMethod SEQ_tool_settings_fit_method_get(struct Scene *scene);
|
|
|
|
void SEQ_tool_settings_fit_method_set(struct Scene *scene, eSeqImageFitMethod fit_method);
|
|
|
|
struct SequencerToolSettings *SEQ_tool_settings_copy(struct SequencerToolSettings *tool_settings);
|
2020-12-19 05:57:27 +01:00
|
|
|
struct Editing *SEQ_editing_get(struct Scene *scene, bool alloc);
|
|
|
|
struct Editing *SEQ_editing_ensure(struct Scene *scene);
|
|
|
|
void SEQ_editing_free(struct Scene *scene, const bool do_id_user);
|
2020-12-17 02:11:22 +01:00
|
|
|
struct ListBase *SEQ_active_seqbase_get(const struct Editing *ed);
|
2021-03-02 12:34:03 +01:00
|
|
|
void SEQ_seqbase_active_set(struct Editing *ed, struct ListBase *seqbase);
|
2020-12-19 06:44:57 +01:00
|
|
|
struct Sequence *SEQ_sequence_alloc(ListBase *lb, int timeline_frame, int machine, int type);
|
2020-12-19 05:57:27 +01:00
|
|
|
void SEQ_sequence_free(struct Scene *scene, struct Sequence *seq, const bool do_clean_animdata);
|
2021-03-02 12:34:03 +01:00
|
|
|
struct MetaStack *SEQ_meta_stack_alloc(struct Editing *ed, struct Sequence *seq_meta);
|
|
|
|
struct MetaStack *SEQ_meta_stack_active_get(const struct Editing *ed);
|
|
|
|
void SEQ_meta_stack_free(struct Editing *ed, struct MetaStack *ms);
|
2020-12-19 05:57:27 +01:00
|
|
|
void SEQ_offset_animdata(struct Scene *scene, struct Sequence *seq, int ofs);
|
|
|
|
void SEQ_dupe_animdata(struct Scene *scene, const char *name_src, const char *name_dst);
|
|
|
|
struct Sequence *SEQ_sequence_dupli_recursive(const struct Scene *scene_src,
|
2019-01-11 19:48:56 +01:00
|
|
|
struct Scene *scene_dst,
|
|
|
|
struct ListBase *new_seq_list,
|
|
|
|
struct Sequence *seq,
|
|
|
|
int dupe_flag);
|
2020-12-19 05:57:27 +01:00
|
|
|
void SEQ_sequence_base_dupli_recursive(const struct Scene *scene_src,
|
2017-08-10 13:00:01 +02:00
|
|
|
struct Scene *scene_dst,
|
|
|
|
struct ListBase *nseqbase,
|
|
|
|
const struct ListBase *seqbase,
|
Refactor ID copying (and to some extent, ID freeing).
This will allow much finer controll over how we copy data-blocks, from
full copy in Main database, to "lighter" ones (out of Main, inside an
already allocated datablock, etc.).
This commit also transfers a llot of what was previously handled by
per-ID-type custom code to generic ID handling code in BKE_library.
Hopefully will avoid in future inconsistencies and missing bits we had
all over the codebase in the past.
It also adds missing copying handling for a few types, most notably
Scene (which where using a fully customized handling previously).
Note that the type of allocation used during copying (regular in Main,
allocated but outside of Main, or not allocated by ID handling code at
all) is stored in ID's, which allows to handle them correctly when
freeing. This needs to be taken care of with caution when doing 'weird'
unusual things with ID copying and/or allocation!
As a final note, while rather noisy, this commit will hopefully not
break too much existing branches, old 'API' has been kept for the main
part, as a wrapper around new code. Cleaning it up will happen later.
Design task : T51804
Phab Diff: D2714
2017-08-07 16:39:55 +02:00
|
|
|
int dupe_flag,
|
|
|
|
const int flag);
|
2020-11-19 05:26:57 +01:00
|
|
|
|
2019-11-29 11:42:18 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|