1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Fernando Sahmkow
/**
* @file m2_anim.h
* @brief WoW animation import (design §10.8.3, the Wow row).
*
* The easy one, and worth saying why: an `.m2` track is **already** per
* sequence — `AnimationTrack<T>::timestamps` is a vector of vectors, one inner
* array per sequence — so there is nothing to slice. One sequence is one clip,
* one container, and the inner array at the sequence's index is the sub-track.
*
* Three things that are not:
*
* - **Global sequences.** A track with a `globalSequenceId` keeps its keys in
* inner array 0 and loops on the world clock. It becomes one auto-play clip
* per global loop — the same `AutoPlay | WorldClocked` MDX's `globalSeqId` and
* M3's SEQS flag 0x2 arrive at.
* - **Alias sequences.** `SequenceFlag::IsAlias` means the sequence has no data
* of its own and `aliasNext` names the one that does. The clip is still
* imported — a host asking for it by name must find it — and the chain rides
* `ClipNative`, because following it is playback policy and WEM does not own
* the blender.
* - **Fixed-point values.** `i16` weights and colours are `x / 32767`, and a
* `u8` visibility is a flag, not a byte to scale. Getting the second one wrong
* is a model that draws at 1/255 opacity and looks invisible rather than
* broken.
*
* ### Where a texture track lands
*
* A batch's weight and transform are indices into `textureWeights` and
* `textureTransforms`, resolved per texture unit and stored on the material's
* `native::M2Material` block. Import reads them back from there rather than
* redoing the combo-table join: the unit ordinal **is** the `Combiners` stage
* ordinal, so the block already answers "which stage does this track drive".
*
* `M2Color` is the exception. It multiplies the whole batch, not one stage, so
* its channels target `kWholeMaterial` — the same "not one of its layers"
* ordinal `MaterialFeature::layer` uses.
*/
namespace whiteout // namespace whiteout