Kage Studio 0.7.240121
A Simple Free and Open Source 2D Animation Software
Loading...
Searching...
No Matches
KageScene Class Reference

#include <scene.h>

Collaboration diagram for KageScene:

Public Member Functions

void init (KageDocument *p_document, unsigned int p_sceneID)
 
 KageScene (KageDocument *p_document, unsigned int p_sceneID, std::string p_filepath)
 
KageScene operator= (const KageScene &p_scene)
 
unsigned int getID ()
 
bool open (std::string p_filepath)
 
bool save ()
 
void setSelected (bool p_selected)
 
bool isSelected ()
 
bool isSaved ()
 
 KageScene (KageDocument *p_document, unsigned int p_sceneID)
 
 KageScene (KageDocument *p_document, unsigned int p_sceneID, KageScene *p_scene)
 
virtual ~KageScene ()
 
void addLayer ()
 
void deleteLayer (unsigned int p_layerID)
 
bool removeLayerAt (unsigned int p_layerIndex)
 
bool addLayerFrame ()
 
bool extendLayerFrame ()
 
bool duplicateLayerFrame ()
 
bool removeLayerFrame ()
 
void setLayerCurrentFrame (unsigned int p_frame, bool p_addSelected)
 
void setCurrentFrameByID (unsigned int p_frameID)
 
unsigned int getCurrentFrame ()
 
void setCurrentLayer (unsigned int p_currentLayer, bool p_addSelected)
 
void setCurrentLayerByID (unsigned int p_layerID)
 
unsigned int getCurrentLayer ()
 
unsigned int frameCount ()
 
void selectAllLayerFrame (bool p_selectAll)
 
KageFramegetFrame ()
 
KageFramegetFrameAt (unsigned int p_frame)
 
KageLayergetLayer ()
 
KageLayergetLayerAt (unsigned int p_layer)
 
bool removeAllFrames ()
 
bool moveToTop ()
 
bool moveUp ()
 
bool moveDown ()
 
bool moveToBottom ()
 
std::vector< unsigned int > raiseSelectedShape (std::vector< unsigned int > p_selectedShapes)
 
std::vector< unsigned int > lowerSelectedShape (std::vector< unsigned int > p_selectedShapes)
 
std::vector< unsigned int > raiseToTopSelectedShape (std::vector< unsigned int > p_selectedShapes)
 
std::vector< unsigned int > lowerToBottomSelectedShape (std::vector< unsigned int > p_selectedShapes)
 
std::vector< unsigned int > groupSelectedShapes (std::vector< unsigned int > p_selectedShapes)
 
std::vector< unsigned int > ungroupSelectedShapes (std::vector< unsigned int > p_selectedShapes)
 
std::vector< unsigned int > duplicateShapes (std::vector< unsigned int > p_selectedShapes)
 
bool flipHorizontalSelectedShape (std::vector< unsigned int > p_selectedShapes)
 
bool flipVerticalSelectedShape (std::vector< unsigned int > p_selectedShapes)
 
bool recenterRotationPoint (std::vector< unsigned int > p_selectedShapes)
 
bool addDataToFrame (VectorDataManager p_vectorsData)
 
bool setFrameData (VectorDataManager p_vectorsData)
 
VectorDataManager getFrameData ()
 
VectorDataManager getFrameDataAt (unsigned int p_frame, bool p_frameOnion, bool p_layerOnion)
 
bool forceSetTween (unsigned int p_tween)
 NOTE: "Frame" – NOT "frame ID".
 
bool setTween (unsigned int p_tween)
 
unsigned int getTween ()
 
bool layerSwitchToPreviousFrame ()
 
bool layerSwitchToPreviousFrame (unsigned int p_frameID)
 Called by Kage for navigating to Previous Frame.
 
bool layerSwitchToNextFrame ()
 Called by KageFrame for navigating to Previous Frame.
 
bool layerSwitchToNextFrame (unsigned int p_frameID)
 Called by Kage for navigating to Next Frame.
 
void setFrameExtension (KageFrame::extension p_extension)
 Called by KageFrame for navigating to Next Frame.
 
void extendFrameAt (unsigned int p_layerIndex, unsigned int p_frameIndex, unsigned int p_frameCount)
 will be called from KageTimeline from mouse gesture of stretching the frame
 
unsigned int getActiveLayerID ()
 
std::string getLayerLabel ()
 
void setLayerLabel (std::string p_label)
 
void toggleLayerVisibility ()
 
bool isLayerVisible ()
 
void setLayerVisible (bool p_visible)
 
void toggleLayerLock ()
 
bool isLayerLocked ()
 
void setLayerLocked (bool p_locked)
 
std::string getLabel ()
 
void setLabel (std::string p_label)
 

Data Fields

unsigned int sceneID
 
bool _selected
 
bool _saved
 
unsigned int _activeLayerID
 
unsigned int _activeLayerIndex
 
unsigned int _activeLayer
 
unsigned int layerCtr
 
std::string _label
 will be used to create Unique LayerUI IDs
 
std::vector< KageLayer * > Layers
 
KageLayer_layerPtr
 
KageDocument_document
 
KageScene_parent
 
bool _isAsset
 

Static Public Attributes

static bool LOADING_MODE = false
 
static std::vector< unsigned int > sceneStack = {}
 

Constructor & Destructor Documentation

◆ KageScene() [1/3]

KageScene::KageScene ( KageDocument * p_document,
unsigned int p_sceneID,
std::string p_filepath )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ KageScene() [2/3]

KageScene::KageScene ( KageDocument * p_document,
unsigned int p_sceneID )
Here is the call graph for this function:

◆ KageScene() [3/3]

KageScene::KageScene ( KageDocument * p_document,
unsigned int p_sceneID,
KageScene * p_scene )
Here is the call graph for this function:

◆ ~KageScene()

KageScene::~KageScene ( )
virtual

Member Function Documentation

◆ addDataToFrame()

bool KageScene::addDataToFrame ( VectorDataManager p_vectorsData)
Here is the call graph for this function:

◆ addLayer()

void KageScene::addLayer ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addLayerFrame()

bool KageScene::addLayerFrame ( )

NOTE: why duplicate?

Here is the call graph for this function:

◆ deleteLayer()

void KageScene::deleteLayer ( unsigned int p_layerID)

◆ duplicateLayerFrame()

bool KageScene::duplicateLayerFrame ( )
Here is the call graph for this function:

◆ duplicateShapes()

std::vector< unsigned int > KageScene::duplicateShapes ( std::vector< unsigned int > p_selectedShapes)
Here is the call graph for this function:

◆ extendFrameAt()

void KageScene::extendFrameAt ( unsigned int p_layerIndex,
unsigned int p_frameIndex,
unsigned int p_frameCount )

will be called from KageTimeline from mouse gesture of stretching the frame

Parameters
p_layerIndex0 to Layer size less 1
p_frameCounthow many frames to stretch

◆ extendLayerFrame()

bool KageScene::extendLayerFrame ( )
Here is the caller graph for this function:

◆ flipHorizontalSelectedShape()

bool KageScene::flipHorizontalSelectedShape ( std::vector< unsigned int > p_selectedShapes)
Here is the call graph for this function:

◆ flipVerticalSelectedShape()

bool KageScene::flipVerticalSelectedShape ( std::vector< unsigned int > p_selectedShapes)
Here is the call graph for this function:

◆ forceSetTween()

bool KageScene::forceSetTween ( unsigned int p_tween)

NOTE: "Frame" – NOT "frame ID".

Here is the call graph for this function:

◆ frameCount()

unsigned int KageScene::frameCount ( )
Here is the caller graph for this function:

◆ getActiveLayerID()

unsigned int KageScene::getActiveLayerID ( )
Here is the caller graph for this function:

◆ getCurrentFrame()

unsigned int KageScene::getCurrentFrame ( )
Here is the caller graph for this function:

◆ getCurrentLayer()

unsigned int KageScene::getCurrentLayer ( )

For use of Kage. To keep track of active Layer in-check of all layers in Scene

Returns
index+1 of registered active layer
See also
setCurrentLayer()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getFrame()

KageFrame * KageScene::getFrame ( )
Here is the call graph for this function:

◆ getFrameAt()

KageFrame * KageScene::getFrameAt ( unsigned int p_frame)
Here is the call graph for this function:

◆ getFrameData()

VectorDataManager KageScene::getFrameData ( )
Here is the call graph for this function:

◆ getFrameDataAt()

VectorDataManager KageScene::getFrameDataAt ( unsigned int p_frame,
bool p_frameOnion,
bool p_layerOnion )
Here is the call graph for this function:

◆ getID()

unsigned int KageScene::getID ( )
Here is the caller graph for this function:

◆ getLabel()

std::string KageScene::getLabel ( )
Here is the caller graph for this function:

◆ getLayer()

KageLayer * KageScene::getLayer ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getLayerAt()

KageLayer * KageScene::getLayerAt ( unsigned int p_layer)

◆ getLayerLabel()

std::string KageScene::getLayerLabel ( )
Here is the caller graph for this function:

◆ getTween()

unsigned int KageScene::getTween ( )
Here is the call graph for this function:

◆ groupSelectedShapes()

std::vector< unsigned int > KageScene::groupSelectedShapes ( std::vector< unsigned int > p_selectedShapes)
Here is the call graph for this function:

◆ init()

void KageScene::init ( KageDocument * p_document,
unsigned int p_sceneID )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isLayerLocked()

bool KageScene::isLayerLocked ( )
Here is the caller graph for this function:

◆ isLayerVisible()

bool KageScene::isLayerVisible ( )
Here is the caller graph for this function:

◆ isSaved()

bool KageScene::isSaved ( )

◆ isSelected()

bool KageScene::isSelected ( )
Here is the caller graph for this function:

◆ layerSwitchToNextFrame() [1/2]

bool KageScene::layerSwitchToNextFrame ( )

Called by KageFrame for navigating to Previous Frame.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ layerSwitchToNextFrame() [2/2]

bool KageScene::layerSwitchToNextFrame ( unsigned int p_frameID)

Called by Kage for navigating to Next Frame.

Here is the call graph for this function:

◆ layerSwitchToPreviousFrame() [1/2]

bool KageScene::layerSwitchToPreviousFrame ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ layerSwitchToPreviousFrame() [2/2]

bool KageScene::layerSwitchToPreviousFrame ( unsigned int p_frameID)

Called by Kage for navigating to Previous Frame.

Here is the call graph for this function:

◆ lowerSelectedShape()

std::vector< unsigned int > KageScene::lowerSelectedShape ( std::vector< unsigned int > p_selectedShapes)
Here is the call graph for this function:

◆ lowerToBottomSelectedShape()

std::vector< unsigned int > KageScene::lowerToBottomSelectedShape ( std::vector< unsigned int > p_selectedShapes)
Here is the call graph for this function:

◆ moveDown()

bool KageScene::moveDown ( )

NOTE: KageFrameset are organized as index 0 as BOTTOM and last index is TOP

See also
moveToBottom() moveToTop() moveUp()
Returns
True if KageFrameset successfully moved down
Here is the call graph for this function:

◆ moveToBottom()

bool KageScene::moveToBottom ( )

NOTE: KageFrameset are organized as index 0 as BOTTOM and last index is TOP

See also
moveDown() moveToTop() moveUp()
Returns
True if KageFrameset successfully moved to bottom
Here is the call graph for this function:

◆ moveToTop()

bool KageScene::moveToTop ( )

NOTE: KageFrameset are organized as index 0 as BOTTOM and last index is TOP

See also
moveDown() moveToBottom() moveUp()
Returns
True if KageFrameset successfully moved to top
Here is the call graph for this function:

◆ moveUp()

bool KageScene::moveUp ( )

NOTE: KageFrameset are organized as index 0 as BOTTOM and last index is TOP

See also
moveDown() moveToBottom() moveToTop()
Returns
True if KageFrameset successfully moved up
Here is the call graph for this function:

◆ open()

bool KageScene::open ( std::string p_filepath)
Here is the caller graph for this function:

◆ operator=()

KageScene KageScene::operator= ( const KageScene & p_scene)
Here is the call graph for this function:

◆ raiseSelectedShape()

std::vector< unsigned int > KageScene::raiseSelectedShape ( std::vector< unsigned int > p_selectedShapes)
Here is the call graph for this function:

◆ raiseToTopSelectedShape()

std::vector< unsigned int > KageScene::raiseToTopSelectedShape ( std::vector< unsigned int > p_selectedShapes)
Here is the call graph for this function:

◆ recenterRotationPoint()

bool KageScene::recenterRotationPoint ( std::vector< unsigned int > p_selectedShapes)
Here is the call graph for this function:

◆ removeAllFrames()

bool KageScene::removeAllFrames ( )

◆ removeLayerAt()

bool KageScene::removeLayerAt ( unsigned int p_layerIndex)
Here is the caller graph for this function:

◆ removeLayerFrame()

bool KageScene::removeLayerFrame ( )
Here is the call graph for this function:

◆ save()

bool KageScene::save ( )

◆ selectAllLayerFrame()

void KageScene::selectAllLayerFrame ( bool p_selectAll)
Here is the caller graph for this function:

◆ setCurrentFrameByID()

void KageScene::setCurrentFrameByID ( unsigned int p_frameID)
Here is the call graph for this function:

◆ setCurrentLayer()

void KageScene::setCurrentLayer ( unsigned int p_currentLayer,
bool p_addSelected )

For use of Kage.

Parameters
p_layeris index+1 of active layer
p_addSelectedselect another Layer or not
See also
getCurrentLayer()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setCurrentLayerByID()

void KageScene::setCurrentLayerByID ( unsigned int p_layerID)
Here is the call graph for this function:

◆ setFrameData()

bool KageScene::setFrameData ( VectorDataManager p_vectorsData)
Here is the call graph for this function:

◆ setFrameExtension()

void KageScene::setFrameExtension ( KageFrame::extension p_extension)

Called by KageFrame for navigating to Next Frame.

Here is the call graph for this function:

◆ setLabel()

void KageScene::setLabel ( std::string p_label)
Here is the caller graph for this function:

◆ setLayerCurrentFrame()

void KageScene::setLayerCurrentFrame ( unsigned int p_frame,
bool p_addSelected )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setLayerLabel()

void KageScene::setLayerLabel ( std::string p_label)
Here is the caller graph for this function:

◆ setLayerLocked()

void KageScene::setLayerLocked ( bool p_locked)
Here is the caller graph for this function:

◆ setLayerVisible()

void KageScene::setLayerVisible ( bool p_visible)
Here is the caller graph for this function:

◆ setSelected()

void KageScene::setSelected ( bool p_selected)
Here is the caller graph for this function:

◆ setTween()

bool KageScene::setTween ( unsigned int p_tween)
Here is the call graph for this function:

◆ toggleLayerLock()

void KageScene::toggleLayerLock ( )
Here is the caller graph for this function:

◆ toggleLayerVisibility()

void KageScene::toggleLayerVisibility ( )
Here is the caller graph for this function:

◆ ungroupSelectedShapes()

std::vector< unsigned int > KageScene::ungroupSelectedShapes ( std::vector< unsigned int > p_selectedShapes)
Here is the call graph for this function:

Field Documentation

◆ _activeLayer

unsigned int KageScene::_activeLayer

◆ _activeLayerID

unsigned int KageScene::_activeLayerID

◆ _activeLayerIndex

unsigned int KageScene::_activeLayerIndex

◆ _document

KageDocument* KageScene::_document

◆ _isAsset

bool KageScene::_isAsset

◆ _label

std::string KageScene::_label

will be used to create Unique LayerUI IDs

◆ _layerPtr

KageLayer* KageScene::_layerPtr

◆ _parent

KageScene* KageScene::_parent

◆ _saved

bool KageScene::_saved

◆ _selected

bool KageScene::_selected

◆ layerCtr

unsigned int KageScene::layerCtr

◆ Layers

std::vector<KageLayer *> KageScene::Layers

◆ LOADING_MODE

bool KageScene::LOADING_MODE = false
static

◆ sceneID

unsigned int KageScene::sceneID

◆ sceneStack

std::vector< unsigned int > KageScene::sceneStack = {}
static

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