FMontageDocument
A montage as a FILE of its own (.montage) instead of a row inside the model's .manimmeta sidecar. The payload is the same FAnimMontageDef the sidecar has always carried — sections, slot, blend in/out, play rate, montage-own notifies and curves — plus the one thing the sidecar got for free by living inside the model: which model's clips the sections name.
- Module
- Animation
- Header
#include "Animation/MontageDocument.h"- Namespace
Mowo
Both forms stay live. FAnimClipMetadata still reads and builds the sidecar rows, and both routes build through BuildFromDef below, so an authored def can never mean two different things depending on where it was stored.
Properties
| Type | Name | Description |
|---|---|---|
FAnimMontageDef | Def | |
std::string | SkeletalMeshPath | The .mmodel whose clips Def names. Sections address clips by NAME, so a montage without a model is a description of nothing — the editor requires one and ResolveForAnimator skips a montage whose model is not the animator's, rather than silently building it against the wrong rig. |
Public functions
| Returns | Name | Description |
|---|---|---|
const char* | Extension | |
const std::string& | Name | What replication hashes into a montage id and what PlayMontageAsset looks up: the montage's own name, never its path. |
std::string | SerializeToString | |
bool | DeserializeFromString | |
bool | SaveToFile | |
bool | LoadFromFile | |
bool | LoadFromVfs | Mounted-content read, for a cooked build where the montage lives inside an archive and has no native path to open. |
bool | BuildMontage | |
bool | BuildFromDef | The single resolver both montage sources run through. |
uint32_t | BindClipIds | Fills the montage's and each section's clip package id from the clip its name resolves to among clips; an id that already resolves is kept. |
FMontageDocument | FromSidecarDef | Lifts a sidecar row into a standalone document — what the editor's "export montage to asset" writes, and the only migration a project needs, since the sidecar form keeps working untouched. |
void | ResolveForAnimator | Loads every .montage the animator names, once, and caches the built descriptions on the component. |
Function details
Extension
static const char* Extension()Name
const std::string& Name() constWhat replication hashes into a montage id and what PlayMontageAsset looks up: the montage's own name, never its path. A file that moves or is renamed keeps its wire identity; renaming the MONTAGE is the deliberate act that changes it.
SerializeToString
std::string SerializeToString() constDeserializeFromString
bool DeserializeFromString(const std::string& text, const char* label = "<montage>")SaveToFile
bool SaveToFile(const std::string& path) constLoadFromFile
bool LoadFromFile(const std::string& path)LoadFromVfs
bool LoadFromVfs(const std::string& vfsPath)Mounted-content read, for a cooked build where the montage lives inside an archive and has no native path to open.
BuildMontage
bool BuildMontage(const std::vector<Ref<AnimationClip>>& clips, Montage& outMontage) constBuildFromDef
static bool BuildFromDef(const FAnimMontageDef& def, const std::vector<Ref<AnimationClip>>& clips, Montage& outMontage)The single resolver both montage sources run through.
BindClipIds
static uint32_t BindClipIds(FAnimMontageDef& def, const std::vector<Ref<AnimationClip>>& clips)Fills the montage's and each section's clip package id from the clip its name resolves to among clips; an id that already resolves is kept. Returns how many ids it wrote.
FromSidecarDef
static FMontageDocument FromSidecarDef(const FAnimMontageDef& def, const std::string& modelPath)Lifts a sidecar row into a standalone document — what the editor's "export montage to asset" writes, and the only migration a project needs, since the sidecar form keeps working untouched.
ResolveForAnimator
static void ResolveForAnimator(AnimatorComponent& animator)Loads every .montage the animator names, once, and caches the built descriptions on the component. Called after the model's clips are in — a montage cannot be built before the clips its sections name exist.