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_;
void playAnimation()
Called by the ui and starts an automatic animation.
void addedEmptyObject(int _id)
Update ui when the object is added.
void UpdateUI()
Called when the active object changes and the interface needs to be updated.
int animationOffset_
This frame was selected as the animation was started.
void fileOpened(int _id)
Update ui when the object is loaded.
BaseSkin::Method method_
The current blending method for the skin.
bool bGuiUpdating_
Used to drop a few messages while the gui is being updated.
Logtype
Log types for Message Window.
void initializePlugin()
initialize the plugin
AnimationHandle currentAnimationHandle()
Returns a handle describing the current frame in the active animation.
void animate()
Iterates the animation.
QString name()
returns the plugin name
void slotClearSkins()
Called by Qt as the user is trying to unbind a mesh from as a skeleton.
The skeletal animation plugin is used to interact with the skeleton.
void pauseAnimation()
Called by the ui and stops the current animation.
Method
Possible deformation methods.
QString description()
returns a plugin description
PoseT< Skeleton::Point > Pose
Pose typedef.
void objectDeleted(int _id)
Update ui when the object is deleted.
void prevFrame()
Called by the ui and goes to previous frame of the current animation.
bool clearSkins(int skeletonId)
Returns the number of frames in the currently active animation.
void updateSkins()
Returns the number of frames in the currently active animation.
void slotMethodChanged(int _index)
Called as the skin deformation method changed.
void setComboBoxPosition(unsigned int _animationIndex)
Sets the animations combo box to the right entry.
Interface class from which all plugins have to be created.
A general pose, used to store the frames of the animation.
int getNumberOfFrames()
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 detachSkin(int skeletonId, int skinId)
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.
void slotFrameChanged(int)
Called by the framework when a different frame was selected.
Interface for all Plugins which do logging to the logging window of the framework.
int getFrame()
Gets the current frame number.
void slotAttachSkin()
Called by Qt as the user is trying to connect a mesh to a skeleton.
void UpdateSkins(BaseObjectData *_pSkeletonObject, AnimationHandle &_hAni)
Changes the mesh's pose to represent the frame given by the animation handle.
void nextFrame()
Called by the ui and goes to next frame of the current animation.
void changeFPS(int _fps)
Change the frames per second (FPS)
void slotAllCleared()
clear all occurred
void slotObjectUpdated(int _id, const UpdateType &_type)
Check activePose if a skeleton was updated.
void checkObjectSelection(const int _objectId)
Check source/target selection of objects.
SkeletalAnimationPlugin()
Constructor.
void setFrame(int _iFrame)
Displays the given frame from the current animation and updates the view.
Interface for all plugins which want to Load or Save files and create Objects.
void slotAnimationIndexChanged(int)
Called by the framework when the animation index changed.
bool attachSkin(int skeletonId, int skinId)
Returns the number of frames in the currently active animation.
void slotSkipFramesChanged(int _state)
Called as the skip frames check box changes state.
void exit()
Plugin gets closed.
void stopAnimation()
Called by the ui and stops the current animation.
QTime animationTime_
Time since the animation was started, used to meet the given fps.
void pluginsInitialized()
final initializations
Interface to call functions across plugins.
AnimationToolboxWidget * pToolbox_
A pointer to the toolbox widget.
void slotObjectSelectionChanged(int _id)
Update ui when the object selection changes.
QTimer animationTimer_
Timer used to control animations.