Class AnimationGraph
The Animation Graph is used to evaluate a final pose for the animated model for the current frame.
Inherited Members
Assembly: FlaxEngine.dll
File: Engine/Content/Assets/AnimationGraph.h
Syntax
public class AnimationGraph : public BinaryAsset
Fields
Graph
GraphExecutor
The animation graph runtime executor.
Declaration
public AnimGraphExecutor GraphExecutor
Field Value
AnimGraphExecutor
|
Methods
GetBaseModel()
Gets the base model asset used for the animation preview and the skeleton layout source.
Declaration
public SkinnedModel* GetBaseModel() const
Returns
SkinnedModel
|
getChunksToPreload()
Gets packed chunks indices to preload before asset loading action
Declaration
protected virtual AssetChunksFlag getChunksToPreload() const override
Returns
AssetChunksFlag
Chunks to load flags |
Overrides
GetReferences(Array<Guid>& assets, Array<String>& files)
Declaration
public void GetReferences(Array<Guid>& assets, Array<String>& files) const override
Parameters
Array<Guid>
assets
|
Array<String>
files
|
InitAsAnimation(SkinnedModel* baseModel, Animation* anim, bool loop=true, bool rootMotion=false)
Initializes virtual Anim Graph to play a single animation.
Declaration
public bool InitAsAnimation(SkinnedModel* baseModel, Animation* anim, bool loop=true, bool rootMotion=false)
Parameters
SkinnedModel
baseModel
The base model asset. |
Animation
anim
The animation to play. |
bool
loop
True if play animation in a loop. |
bool
rootMotion
True if apply root motion. Otherwise it will be ignored. |
Returns
bool
True if failed, otherwise false. |
load()
Load data from the chunks
Declaration
protected virtual LoadResult load() override
Returns
LoadResult
Loading result |
Overrides
LoadSurface()
Tries to load surface graph from the asset.
Declaration
public BytesContainer LoadSurface() const
Returns
BytesContainer
The surface data or empty if failed to load it. |
OnDependencyModified(BinaryAsset* asset)
Called when one of the asset dependencies gets modified (it was saved or reloaded or reimported).
Declaration
protected virtual void OnDependencyModified(BinaryAsset* asset) override
Parameters
BinaryAsset
asset
The modified asset that this asset depends on. |
Overrides
Save(const StringView& path=StringView::Empty)
Saves this asset to the file. Supported only in Editor.
Declaration
public virtual bool Save(const StringView& path=StringView::Empty) override
Parameters
StringView
path
The custom asset path to use for the saving. Use empty value to save this asset to its own storage location. Can be used to duplicate asset. Must be specified when saving virtual asset. |
Returns
bool
True when cannot save data, otherwise false. |
Overrides
SaveSurface(const BytesContainer& data)
Updates the animation graph surface (save new one, discard cached data, reload asset).
Declaration
public bool SaveSurface(const BytesContainer& data)
Parameters
BytesContainer
data
Stream with graph data. |
Returns
bool
True if cannot save it, otherwise false. |
unload(bool isReloading)
Unloads asset data
Declaration
protected virtual void unload(bool isReloading) override
Parameters
bool
isReloading
True if asset is reloading data, otherwise false. |