mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 22:54:34 +00:00
Bugfixes and improvements for the animation component and related asset behavior.
Adds in ability to establish a shape animation asset as being cyclic or blended. Adds functionality for blended animations to integrated into shapeAssets.
This commit is contained in:
parent
cfbdf63cd7
commit
14ae287c0c
6 changed files with 130 additions and 15 deletions
|
|
@ -37,6 +37,12 @@
|
|||
#ifndef _ASSET_FIELD_TYPES_H_
|
||||
#include "assets/assetFieldTypes.h"
|
||||
#endif
|
||||
#ifndef _TSSHAPE_H_
|
||||
#include "ts/tsShape.h"
|
||||
#endif
|
||||
#ifndef __RESOURCE_H__
|
||||
#include "core/resource.h"
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
class ShapeAnimationAsset : public AssetBase
|
||||
|
|
@ -46,6 +52,15 @@ class ShapeAnimationAsset : public AssetBase
|
|||
protected:
|
||||
StringTableEntry mFileName;
|
||||
|
||||
bool mIsEmbedded;
|
||||
bool mIsCyclical;
|
||||
|
||||
bool mIsBlend;
|
||||
|
||||
StringTableEntry mBlendAnimAssetName;
|
||||
|
||||
S32 mBlendFrame;
|
||||
|
||||
//
|
||||
StringTableEntry mAnimationName;
|
||||
S32 mStartFrame;
|
||||
|
|
@ -53,6 +68,8 @@ protected:
|
|||
bool mPadRotation;
|
||||
bool mPadTransforms;
|
||||
|
||||
Resource<TSShape> mSourceShape;
|
||||
|
||||
public:
|
||||
ShapeAnimationAsset();
|
||||
virtual ~ShapeAnimationAsset();
|
||||
|
|
@ -65,18 +82,25 @@ public:
|
|||
DECLARE_CONOBJECT(ShapeAnimationAsset);
|
||||
|
||||
protected:
|
||||
virtual void initializeAsset(void) {}
|
||||
virtual void onAssetRefresh(void) {}
|
||||
virtual void initializeAsset(void);
|
||||
virtual void onAssetRefresh(void);
|
||||
|
||||
public:
|
||||
StringTableEntry getAnimationFilename() { return mFileName; }
|
||||
StringTableEntry getAnimationName() { return mAnimationName; }
|
||||
StringTableEntry getBlendAnimationName() { return mBlendAnimAssetName; }
|
||||
|
||||
S32 getStartFrame() { return mStartFrame; }
|
||||
S32 getEndFrame() { return mEndFrame; }
|
||||
|
||||
bool getPadRotation() { return mPadRotation; }
|
||||
bool getPadTransforms() { return mPadTransforms; }
|
||||
|
||||
bool isEmbedded() { return mIsEmbedded; }
|
||||
bool isCyclic() { return mIsCyclical; }
|
||||
bool isBlend() { return mIsBlend; }
|
||||
|
||||
S32 getBlendFrame() { return mBlendFrame; }
|
||||
};
|
||||
|
||||
DefineConsoleType(TypeShapeAnimationAssetPtr, ShapeAnimationAsset)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue