FAnimCompressionAuthoring
- Module
- Animation
- Header
#include "Animation/AnimCompressionAuthoring.h"- Namespace
Mowo
Properties
| Type | Name | Description |
|---|---|---|
static constexpr const char* | kTranslationKey | Default "translation_tolerance". |
static constexpr const char* | kRotationKey | Default "rotation_tolerance". |
static constexpr const char* | kScaleKey | Default "scale_tolerance". |
static constexpr const char* | kBoneType | Default "BoneTolerance". |
static constexpr const char* | kRootType | The .manimmeta child type one clip's settings live on, and the root that carries them. Named here rather than spelled in the cook so the two readers cannot disagree about where to look. Default "AnimClipMeta". |
static constexpr const char* | kClipType | Default "Clip". |
Public functions
| Returns | Name | Description |
|---|---|---|
void | ReadNode | Reads whichever of the three keys the node carries; an absent key leaves out on whatever the caller had, so a clip that authors only a rotation tolerance keeps the defaults for the other two. |
void | WriteNode | Writes only what DIFFERS from the codec's own defaults. |
std::string | SidecarPathFor | The settings one clip should be compressed with, read off an already parsed .manimmeta root. |
void | WriteBoneOverrides | Writes the per-bone entries under a clip node, replacing any there. |
FAnimCompressionSettings | ForClip |
Function details
ReadNode
static void ReadNode(const MDF::MdfNode& clipNode, FAnimCompressionSettings& out)Reads whichever of the three keys the node carries; an absent key leaves out on whatever the caller had, so a clip that authors only a rotation tolerance keeps the defaults for the other two.
WriteNode
static void WriteNode(const FAnimCompressionSettings& settings, MDF::MdfNode& clipNode)Writes only what DIFFERS from the codec's own defaults. Writing all three unconditionally would add three keys to every clip entry in every existing .manimmeta the first time anything re-saved one, so the diff of a sidecar would stop saying what the author changed.
SidecarPathFor
static std::string SidecarPathFor(const std::string& modelPath)The settings one clip should be compressed with, read off an already parsed .manimmeta root. A sidecar that names no such clip (or names it with no tolerance keys) gives the codec defaults back, which is what every clip got before this was authorable. <model>.fbx / <model>.fbx.mmodel → <model>.manimmeta (the AnimClipMeta row of Core/FileTypes.h). Lives here rather than only on FAnimClipMetadata because the cook has to find the same file from the other side of a module boundary it cannot link across; FAnimClipMetadata::SidecarPathFor forwards to this.
WriteBoneOverrides
static void WriteBoneOverrides(const FAnimCompressionSettings& settings, MDF::MdfNode& clipNode)Writes the per-bone entries under a clip node, replacing any there.
ForClip
static FAnimCompressionSettings ForClip(const MDF::MdfNode& root, const std::string& clipName)