Krita Source Code Documentation
Loading...
Searching...
No Matches
KisAnimationRenderingOptions Class Reference

#include <KisAnimationRenderingOptions.h>

Public Types

enum  RenderMode { RENDER_FRAMES_ONLY , RENDER_VIDEO_ONLY , RENDER_FRAMES_AND_VIDEO }
 

Public Member Functions

void fromProperties (KisPropertiesConfigurationSP config)
 
 KisAnimationRenderingOptions ()
 
RenderMode renderMode () const
 
QString resolveAbsoluteDocumentFilePath (const QString &documentPath) const
 
QString resolveAbsoluteFramesDirectory () const
 
QString resolveAbsoluteFramesDirectory (const QString &documentPath) const
 
QString resolveAbsoluteVideoFilePath () const
 
QString resolveAbsoluteVideoFilePath (const QString &documentPath) const
 
KisPropertiesConfigurationSP toProperties () const
 

Public Attributes

QString basename
 
QString customFFMpegOptions
 
QString directory
 
QString ffmpegPath
 
int firstFrame = 0
 
KisPropertiesConfigurationSP frameExportConfig
 
QString frameMimeType
 
int frameRate = 25
 
int height = 0
 
bool includeAudio = false
 
QString lastDocumentPath
 
int lastFrame = 0
 
QString scaleFilter
 
int sequenceStart = 0
 
bool shouldDeleteSequence = false
 
bool shouldEncodeVideo = false
 
QString videoFileName
 
QString videoMimeType
 
bool wantsOnlyUniqueFrameSequence = false
 
int width = 0
 

Detailed Description

Definition at line 15 of file KisAnimationRenderingOptions.h.

Member Enumeration Documentation

◆ RenderMode

Constructor & Destructor Documentation

◆ KisAnimationRenderingOptions()

KisAnimationRenderingOptions::KisAnimationRenderingOptions ( )

Member Function Documentation

◆ fromProperties()

void KisAnimationRenderingOptions::fromProperties ( KisPropertiesConfigurationSP config)

Definition at line 100 of file KisAnimationRenderingOptions.cpp.

101{
102 basename = config->getPropertyLazy("basename", basename);
103 lastDocumentPath = config->getPropertyLazy("last_document_path", "");
104 directory = config->getPropertyLazy("directory", directory);
105 firstFrame = config->getPropertyLazy("first_frame", 0);
106 lastFrame = config->getPropertyLazy("last_frame", 0);
107 sequenceStart = config->getPropertyLazy("sequence_start", 0);
108 videoMimeType = config->getPropertyLazy("video_mimetype", videoMimeType);
109 frameMimeType = config->getPropertyLazy("frame_mimetype", frameMimeType);
110
111 shouldEncodeVideo = config->getPropertyLazy("encode_video", false);
112 shouldDeleteSequence = config->getPropertyLazy("delete_sequence", false);
113 wantsOnlyUniqueFrameSequence = config->getPropertyLazy("only_unique_frames", false);
114
115 ffmpegPath = config->getPropertyLazy("ffmpeg_path", "");
116 frameRate = config->getPropertyLazy("framerate", 25);
117 height = config->getPropertyLazy("height", 0);
118 width = config->getPropertyLazy("width", 0);
119 includeAudio = config->getPropertyLazy("include_audio", true);
120 videoFileName = config->getPropertyLazy("filename", "");
121 customFFMpegOptions = config->getPropertyLazy("custom_ffmpeg_options", "");
122
124 frameExportConfig->setPrefixedProperties("frame_export/", frameExportConfig);
125
126}
KisPropertiesConfigurationSP frameExportConfig

References basename, customFFMpegOptions, directory, ffmpegPath, firstFrame, frameExportConfig, frameMimeType, frameRate, height, includeAudio, lastDocumentPath, lastFrame, sequenceStart, shouldDeleteSequence, shouldEncodeVideo, videoFileName, videoMimeType, wantsOnlyUniqueFrameSequence, and width.

◆ renderMode()

◆ resolveAbsoluteDocumentFilePath()

QString KisAnimationRenderingOptions::resolveAbsoluteDocumentFilePath ( const QString & documentPath) const

Definition at line 23 of file KisAnimationRenderingOptions.cpp.

24{
25 return
26 !documentPath.isEmpty() ?
27 documentPath :
28 QStandardPaths::writableLocation(QStandardPaths::PicturesLocation);
29}

◆ resolveAbsoluteFramesDirectory() [1/2]

QString KisAnimationRenderingOptions::resolveAbsoluteFramesDirectory ( ) const

◆ resolveAbsoluteFramesDirectory() [2/2]

QString KisAnimationRenderingOptions::resolveAbsoluteFramesDirectory ( const QString & documentPath) const

Definition at line 37 of file KisAnimationRenderingOptions.cpp.

38{
40 return QFileInfo(resolveAbsoluteVideoFilePath()).absolutePath();
41 }
42
43 const QString basePath = resolveAbsoluteDocumentFilePath(documentPath);
45}
QString resolveAbsoluteDocumentFilePath(const QString &documentPath) const
QString resolveAbsoluteFilePath(const QString &baseDir, const QString &fileName)
Resolve absolute file path from a file path and base dir.

References directory, RENDER_VIDEO_ONLY, renderMode(), resolveAbsoluteDocumentFilePath(), KritaUtils::resolveAbsoluteFilePath(), and resolveAbsoluteVideoFilePath().

◆ resolveAbsoluteVideoFilePath() [1/2]

QString KisAnimationRenderingOptions::resolveAbsoluteVideoFilePath ( ) const

◆ resolveAbsoluteVideoFilePath() [2/2]

QString KisAnimationRenderingOptions::resolveAbsoluteVideoFilePath ( const QString & documentPath) const

◆ toProperties()

KisPropertiesConfigurationSP KisAnimationRenderingOptions::toProperties ( ) const

Definition at line 70 of file KisAnimationRenderingOptions.cpp.

71{
73
74 config->setProperty("basename", basename);
75 config->setProperty("last_document_path", lastDocumentPath);
76 config->setProperty("directory", directory);
77 config->setProperty("first_frame", firstFrame);
78 config->setProperty("last_frame", lastFrame);
79 config->setProperty("sequence_start", sequenceStart);
80 config->setProperty("video_mimetype", videoMimeType);
81 config->setProperty("frame_mimetype", frameMimeType);
82
83 config->setProperty("encode_video", shouldEncodeVideo);
84 config->setProperty("delete_sequence", shouldDeleteSequence);
85 config->setProperty("only_unique_frames", wantsOnlyUniqueFrameSequence);
86
87 config->setProperty("ffmpeg_path", ffmpegPath);
88 config->setProperty("framerate", frameRate);
89 config->setProperty("height", height);
90 config->setProperty("width", width);
91 config->setProperty("include_audio", includeAudio);
92 config->setProperty("filename", videoFileName);
93 config->setProperty("custom_ffmpeg_options", customFFMpegOptions);
94
95 config->setPrefixedProperties("frame_export/", frameExportConfig);
96
97 return config;
98}

References basename, customFFMpegOptions, directory, ffmpegPath, firstFrame, frameExportConfig, frameMimeType, frameRate, height, includeAudio, lastDocumentPath, lastFrame, sequenceStart, shouldDeleteSequence, shouldEncodeVideo, videoFileName, videoMimeType, wantsOnlyUniqueFrameSequence, and width.

Member Data Documentation

◆ basename

QString KisAnimationRenderingOptions::basename

Definition at line 24 of file KisAnimationRenderingOptions.h.

◆ customFFMpegOptions

QString KisAnimationRenderingOptions::customFFMpegOptions

Definition at line 42 of file KisAnimationRenderingOptions.h.

◆ directory

QString KisAnimationRenderingOptions::directory

Definition at line 25 of file KisAnimationRenderingOptions.h.

◆ ffmpegPath

QString KisAnimationRenderingOptions::ffmpegPath

Definition at line 35 of file KisAnimationRenderingOptions.h.

◆ firstFrame

int KisAnimationRenderingOptions::firstFrame = 0

Definition at line 26 of file KisAnimationRenderingOptions.h.

◆ frameExportConfig

KisPropertiesConfigurationSP KisAnimationRenderingOptions::frameExportConfig

Definition at line 43 of file KisAnimationRenderingOptions.h.

◆ frameMimeType

QString KisAnimationRenderingOptions::frameMimeType

Definition at line 22 of file KisAnimationRenderingOptions.h.

◆ frameRate

int KisAnimationRenderingOptions::frameRate = 25

Definition at line 36 of file KisAnimationRenderingOptions.h.

◆ height

int KisAnimationRenderingOptions::height = 0

Definition at line 38 of file KisAnimationRenderingOptions.h.

◆ includeAudio

bool KisAnimationRenderingOptions::includeAudio = false

Definition at line 32 of file KisAnimationRenderingOptions.h.

◆ lastDocumentPath

QString KisAnimationRenderingOptions::lastDocumentPath

Definition at line 20 of file KisAnimationRenderingOptions.h.

◆ lastFrame

int KisAnimationRenderingOptions::lastFrame = 0

Definition at line 27 of file KisAnimationRenderingOptions.h.

◆ scaleFilter

QString KisAnimationRenderingOptions::scaleFilter

Definition at line 39 of file KisAnimationRenderingOptions.h.

◆ sequenceStart

int KisAnimationRenderingOptions::sequenceStart = 0

Definition at line 28 of file KisAnimationRenderingOptions.h.

◆ shouldDeleteSequence

bool KisAnimationRenderingOptions::shouldDeleteSequence = false

Definition at line 31 of file KisAnimationRenderingOptions.h.

◆ shouldEncodeVideo

bool KisAnimationRenderingOptions::shouldEncodeVideo = false

Definition at line 30 of file KisAnimationRenderingOptions.h.

◆ videoFileName

QString KisAnimationRenderingOptions::videoFileName

Definition at line 40 of file KisAnimationRenderingOptions.h.

◆ videoMimeType

QString KisAnimationRenderingOptions::videoMimeType

Definition at line 21 of file KisAnimationRenderingOptions.h.

◆ wantsOnlyUniqueFrameSequence

bool KisAnimationRenderingOptions::wantsOnlyUniqueFrameSequence = false

Definition at line 33 of file KisAnimationRenderingOptions.h.

◆ width

int KisAnimationRenderingOptions::width = 0

Definition at line 37 of file KisAnimationRenderingOptions.h.


The documentation for this class was generated from the following files: