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