Krita Source Code Documentation
Loading...
Searching...
No Matches
KisAnimAutoKey.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2022 Emmet O'Neill <emmetoneill.pdx@gmail.com>
3 * SPDX-FileCopyrightText: 2022 Eoin O'Neill <eoinoneill1991@gmail.com>
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 */
7
8#ifndef _KIS_ANIM_AUTOKEY_H
9#define _KIS_ANIM_AUTOKEY_H
10
11#include "kritaimage_export.h"
12#include <QFlags>
13#include <QMetaType>
14
15template<class T>
16class KisSharedPtr;
17
18class KisPaintDevice;
20
21class KUndo2Command;
22
23namespace KisAutoKey {
24enum Mode {
25 NONE, // AutoKey is disabled. Keyframes must be created manually.
26 BLANK, // AutoKey creates an empty/blank frame. Acts like DUPLICATE when not
27 // applicable (i.e.: filters, transforms, etc.).
28 DUPLICATE // AutoKey will duplicate the active frame.
29};
30
31KRITAIMAGE_EXPORT Mode activeMode();
32KRITAIMAGE_EXPORT void testingSetActiveMode(Mode mode);
33
39
40Q_DECLARE_FLAGS(AutoCreateKeyframeFlags, AutoCreateKeyframeFlag)
41
42
47KRITAIMAGE_EXPORT
48KUndo2Command* tryAutoCreateDuplicatedFrame(KisPaintDeviceSP device, AutoCreateKeyframeFlags flags = None);
49
50}
51
52Q_DECLARE_OPERATORS_FOR_FLAGS(KisAutoKey::AutoCreateKeyframeFlags)
54
55#endif //_KIS_ANIM_AUTOKEY_H
KisSharedPtr< KisPaintDevice > KisPaintDeviceSP
Q_DECLARE_FLAGS(KisUpdaterContextSnapshotEx, KisUpdaterContextSnapshotExTag)
Q_DECLARE_OPERATORS_FOR_FLAGS(KisBaseRectsWalker::SubtreeVisitFlags)
Q_DECLARE_METATYPE(KisPaintopLodLimitations)
void testingSetActiveMode(Mode mode)
KUndo2Command * tryAutoCreateDuplicatedFrame(KisPaintDeviceSP device, AutoCreateKeyframeFlags flags)
create a new duplicated keyframe if auto-keyframe mode is on