50#include "ObjectTypes/Skeleton/BlendingMethod.hh"
53#include <QElapsedTimer>
73 Q_PLUGIN_METADATA(IID
"org.OpenFlipper.Plugins.Plugin-SkeletalAnimation")
81 void log(
Logtype _type, QString _message);
82 void log(QString _message);
83 void addEmptyObject(
DataType _type,
int& _id);
84 void updatedObject(
int _id,
const UpdateType& _type);
86 void pluginExists(QString _pluginName,
bool &_exists);
87 void functionExists(QString _pluginName, QString _functionName,
bool &_exists);
90 void addToolbox( QString _name , QWidget* _widget, QIcon* _icon );
Logtype
Log types for Message Window.
A handle used to refer to an animation or to a specific frame in an animation.
Interface class from which all plugins have to be created.
Interface for all plugins which want to Load or Save files and create Objects.
Interface for all Plugins which do logging to the logging window of the framework.
Interface to call functions across plugins.
The skeletal animation plugin is used to interact with the skeleton.
void exit()
Plugin gets closed.
bool bGuiUpdating_
Used to drop a few messages while the gui is being updated.
void slotAddAnimation()
Returns the number of frames in the currently active animation.
void playAnimation()
Called by the ui and starts an automatic animation.
int getFrame()
Gets the current frame number.
int animationOffset_
This frame was selected as the animation was started.
std::vector< int > activeSkeletons_
A pointer to the toolbox widget.
void slotObjectUpdated(int _id, const UpdateType &_type)
Check activePose if a skeleton was updated.
QString name()
returns the plugin name
void stopAnimation()
Called by the ui and stops the current animation.
void setFrame(int _iFrame)
Displays the given frame from the current animation and updates the view.
void pauseAnimation()
Called by the ui and stops the current animation.
void addedEmptyObject(int _id)
Update ui when the object is added.
QElapsedTimer animationTime_
Time since the animation was started, used to meet the given fps.
void slotAttachSkin()
Called by Qt as the user is trying to connect a mesh to a skeleton.
void slotSkipFramesChanged(int _state)
Called as the skip frames check box changes state.
void initializePlugin()
initialize the plugin
bool clearSkins(int skeletonId)
Returns the number of frames in the currently active animation.
void UpdateUI()
Called when the active object changes and the interface needs to be updated.
void pluginsInitialized()
final initializations
void slotAnimationNameChanged()
Returns the number of frames in the currently active animation.
void setDescriptions()
Returns the number of frames in the currently active animation.
void slotMethodChanged(int _index)
Called as the skin deformation method changed.
void slotDeleteAnimation()
Returns the number of frames in the currently active animation.
void slotAllCleared()
clear all occurred
void slotObjectSelectionChanged(int _id)
Update ui when the object selection changes.
void UpdateSkins(BaseObjectData *_pSkeletonObject, AnimationHandle &_hAni)
Changes the mesh's pose to represent the frame given by the animation handle.
void setComboBoxPosition(unsigned int _animationIndex)
Sets the animations combo box to the right entry.
void checkObjectSelection(const int _objectId)
Check source/target selection of objects.
void slotClearSkins()
Called by Qt as the user is trying to unbind a mesh from as a skeleton.
void prevFrame()
Called by the ui and goes to previous frame of the current animation.
~SkeletalAnimationPlugin()
Returns the number of frames in the currently active animation.
SkeletalAnimationPlugin()
Constructor.
Blending::Method method_
The current blending method for the skin.
void changeFPS(int _fps)
Change the frames per second (FPS)
void fileOpened(int _id)
Update ui when the object is loaded.
void animate()
Iterates the animation.
AnimationHandle currentAnimationHandle()
Returns a handle describing the current frame in the active animation.
void objectDeleted(int _id)
Update ui when the object is deleted.
bool detachSkin(int skeletonId, int skinId)
Returns the number of frames in the currently active animation.
bool attachSkin(int skeletonId, int skinId)
Returns the number of frames in the currently active animation.
QTimer animationTimer_
Timer used to control animations.
QString description()
returns a plugin description
AnimationToolboxWidget * pToolbox_
A pointer to the toolbox widget.
void nextFrame()
Called by the ui and goes to next frame of the current animation.
void updateSkins()
Returns the number of frames in the currently active animation.
void slotAnimationIndexChanged(int)
Called by the framework when the animation index changed.
void slotFrameChanged(int)
Called by the framework when a different frame was selected.
QIcon * toolIcon_
A pointer to the toolbox widget.
int getNumberOfFrames()
Returns the number of frames in the currently active animation.