Krita Source Code Documentation
Loading...
Searching...
No Matches
KisLayerUtils::MergeDownInfo Struct Reference
+ Inheritance diagram for KisLayerUtils::MergeDownInfo:

Public Member Functions

KisNodeList allSrcNodes () override
 
 MergeDownInfo (KisImageSP _image, KisLayerSP _prevLayer, KisLayerSP _currLayer, MergeFlags flags)
 
- Public Member Functions inherited from KisLayerUtils::MergeDownInfoBase
KisLayerSP dstLayer ()
 
 MergeDownInfoBase (KisImageSP _image)
 
virtual ~MergeDownInfoBase ()
 

Public Attributes

KisLayerSP currLayer
 
KisLayerSP prevLayer
 
- Public Attributes inherited from KisLayerUtils::MergeDownInfoBase
KisNodeSP dstNode
 
bool enableOnionSkins = false
 
QSet< int > frames
 
KisImageWSP image
 
bool pinnedToTimeline = false
 
QVector< KisSelectionMaskSPselectionMasks
 
SwitchFrameCommand::SharedStorageSP storage
 

Detailed Description

Definition at line 139 of file kis_layer_utils.cpp.

Constructor & Destructor Documentation

◆ MergeDownInfo()

KisLayerUtils::MergeDownInfo::MergeDownInfo ( KisImageSP _image,
KisLayerSP _prevLayer,
KisLayerSP _currLayer,
MergeFlags flags )
inline

If source layer is not animated, then just merge that into the current frame only. See the other part of this feature in mergeDown() itself

See https://bugs.kde.org/show_bug.cgi?id=475550

Definition at line 140 of file kis_layer_utils.cpp.

144 : MergeDownInfoBase(_image),
145 prevLayer(_prevLayer),
146 currLayer(_currLayer)
147 {
148 if (!flags.testFlag(SkipMergingFrames)) {
151 }
152
159 if (!frames.isEmpty() && !currLayer->isAnimated()) {
161 }
162
164
165 const KisPaintLayer *paintLayer = qobject_cast<KisPaintLayer*>(currLayer.data());
166 if (paintLayer) enableOnionSkins |= paintLayer->onionSkinEnabled();
167
168 paintLayer = qobject_cast<KisPaintLayer*>(prevLayer.data());
169 if (paintLayer) enableOnionSkins |= paintLayer->onionSkinEnabled();
170 }
KisImageAnimationInterface * animationInterface() const
QSet< int > fetchLayerFramesRecursive(KisNodeSP rootNode)
bool isPinnedToTimeline() const
bool isAnimated() const
bool onionSkinEnabled() const

References KisImage::animationInterface(), KisImageAnimationInterface::currentTime(), currLayer, KisSharedPtr< T >::data(), KisLayerUtils::MergeDownInfoBase::enableOnionSkins, KisLayerUtils::fetchLayerFramesRecursive(), KisLayerUtils::MergeDownInfoBase::frames, KisLayerUtils::MergeDownInfoBase::image, KisBaseNode::isAnimated(), KisBaseNode::isPinnedToTimeline(), KisPaintLayer::onionSkinEnabled(), KisLayerUtils::MergeDownInfoBase::pinnedToTimeline, prevLayer, and KisLayerUtils::SkipMergingFrames.

Member Function Documentation

◆ allSrcNodes()

KisNodeList KisLayerUtils::MergeDownInfo::allSrcNodes ( )
inlineoverridevirtual

Implements KisLayerUtils::MergeDownInfoBase.

Definition at line 175 of file kis_layer_utils.cpp.

175 {
176 KisNodeList mergedNodes;
177 mergedNodes << prevLayer;
178 mergedNodes << currLayer;
179 return mergedNodes;
180 }

References currLayer, and prevLayer.

Member Data Documentation

◆ currLayer

KisLayerSP KisLayerUtils::MergeDownInfo::currLayer

Definition at line 173 of file kis_layer_utils.cpp.

◆ prevLayer

KisLayerSP KisLayerUtils::MergeDownInfo::prevLayer

Definition at line 172 of file kis_layer_utils.cpp.


The documentation for this struct was generated from the following file: