-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathm2_bindings_1.cpp
More file actions
380 lines (350 loc) · 24.1 KB
/
Copy pathm2_bindings_1.cpp
File metadata and controls
380 lines (350 loc) · 24.1 KB
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2026 Fernando Sahmkow
//
// AUTOGENERATED by tools/codegen — do not edit by hand.
// Regenerate via: python -m tools.codegen.codegen m2 --backend pybind11
//
// Source headers and `@bind` annotations live under include/whiteout/.
//
// Include order matters here:
// 1. pybind11/pybind11.h sets up the base library
// 2. project headers define whiteout::u32 et al used inside MAKE_OPAQUE
// 3. PYBIND11_MAKE_OPAQUE opts out of stl.h's auto-conversion for our vectors
// 4. pybind11/stl.h, stl_bind.h honor the opaque declarations
#include <pybind11/pybind11.h>
#include <array>
#include <cstdint>
#include <optional>
#include <sstream>
#include <string>
#include <vector>
#include <whiteout/vector_types.h>
#include <whiteout/models/m2/types.h>
#include <whiteout/models/m2/structures/base.h>
#include <whiteout/models/m2/structures/extensions.h>
#include <whiteout/models/m2/structures/phys.h>
#include <whiteout/models/m2/structures/bone_overrides.h>
#include <whiteout/models/m2/structures/skin.h>
#include <whiteout/models/m2/structures.h>
#include <whiteout/models/m2/parser.h>
#include <whiteout/models/m2/phys_file.h>
#include <whiteout/models/m2/bone_file.h>
#include <whiteout/models/m2/writer.h>
#include <whiteout/interfaces.h>
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::i16>);
PYBIND11_MAKE_OPAQUE(std::vector<std::string>);
PYBIND11_MAKE_OPAQUE(std::vector<std::vector<whiteout::u32>>);
PYBIND11_MAKE_OPAQUE(std::vector<std::vector<whiteout::Quaternion>>);
PYBIND11_MAKE_OPAQUE(std::vector<std::vector<whiteout::Vector3f>>);
PYBIND11_MAKE_OPAQUE(std::vector<std::vector<whiteout::f32>>);
PYBIND11_MAKE_OPAQUE(std::vector<std::vector<whiteout::i16>>);
PYBIND11_MAKE_OPAQUE(std::vector<std::vector<whiteout::m2::CameraSpline>>);
PYBIND11_MAKE_OPAQUE(std::vector<std::vector<whiteout::m2::CompatQuaternion>>);
PYBIND11_MAKE_OPAQUE(std::vector<std::vector<whiteout::u16>>);
PYBIND11_MAKE_OPAQUE(std::vector<std::vector<whiteout::u8>>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::u8>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::u32>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::u16>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::Quaternion>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::Vector2f>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::Vector3f>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::Vector4f>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::f32>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::AnimationTrackBase>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::Attachment>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::Batch>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::Bone>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::BoneOverride>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::BoneOverrideSet>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::BoxShape>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::Camera>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::CameraSpline>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::CapsuleShape>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::ColorAnimation>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::CompatQuaternion>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::DebugOcclusionData>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::DetailedLightData>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::DistanceFadeData>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::DistanceJoint>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::EdgeFadeData>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::Event>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::Extent>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::GlobalSequence>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::Light>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::Material>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::ParticleEmitter>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::ParticleGeosetData>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::PhysicsBody>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::PhysicsJoint>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::PhysicsShape>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::PhysicsTuning>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::PivotDisplacementData>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::PolytopeHalfEdge>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::PolytopeShape>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::PrismaticJoint>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::RevoluteJoint>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::RibbonEmitter>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::Sequence>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::ShadowBatch>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::ShoulderJoint>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::SkinProfile>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::SkinSection>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::SphereShape>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::SphericalJoint>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::Texture>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::TextureTransform>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::TextureWeight>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::TexturedLightData>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::Vertex>);
PYBIND11_MAKE_OPAQUE(std::vector<whiteout::m2::WeldJoint>);
#include <pybind11/stl.h>
#include <pybind11/stl_bind.h>
#include <pybind11/operators.h>
#include <pybind11/numpy.h>
namespace py = pybind11;
namespace {
// Buffer-protocol vector wrapper for std::vector<Elem> where Elem is laid
// out as `Components` contiguous Scalars (Vector3f, Quaternion, ColorBGRA…).
//
// pybind11's bind_vector<> wires up py::buffer_protocol() automatically,
// but stl_bind.h's auto-buffer-info path static-asserts on element types
// lacking a format_descriptor — Vector3f/Quaternion don't have one.
// We provide the same Python surface (append, extend, clear, __getitem__,
// __setitem__, __iter__, __len__, __bool__) plus a 2D buffer view.
template <typename Elem, typename Scalar, py::ssize_t Components>
auto bindBufferVector(py::module_& m, const char* name) {
using Vec = std::vector<Elem>;
py::class_<Vec> cls(m, name, py::buffer_protocol());
cls.def(py::init<>());
cls.def("__len__", [](const Vec& v) { return v.size(); });
cls.def("__bool__", [](const Vec& v) { return !v.empty(); });
cls.def("__getitem__", [](const Vec& v, std::size_t i) -> Elem {
if (i >= v.size()) throw py::index_error();
return v[i];
});
cls.def("__setitem__", [](Vec& v, std::size_t i, const Elem& val) {
if (i >= v.size()) throw py::index_error();
v[i] = val;
});
cls.def("__iter__", [](Vec& v) {
return py::make_iterator(v.begin(), v.end());
}, py::keep_alive<0, 1>());
cls.def("append", [](Vec& v, const Elem& val) { v.push_back(val); });
cls.def("extend", [](Vec& v, const Vec& o) {
v.insert(v.end(), o.begin(), o.end());
});
cls.def("clear", &Vec::clear);
cls.def_buffer([](Vec& v) -> py::buffer_info {
if constexpr (Components == 1) {
return py::buffer_info(
v.data(),
static_cast<py::ssize_t>(sizeof(Scalar)),
py::format_descriptor<Scalar>::format(),
1,
{ static_cast<py::ssize_t>(v.size()) },
{ static_cast<py::ssize_t>(sizeof(Scalar)) });
} else {
return py::buffer_info(
v.data(),
static_cast<py::ssize_t>(sizeof(Scalar)),
py::format_descriptor<Scalar>::format(),
2,
{ static_cast<py::ssize_t>(v.size()), Components },
{ static_cast<py::ssize_t>(sizeof(Elem)),
static_cast<py::ssize_t>(sizeof(Scalar)) });
}
});
return cls;
}
} // namespace
// Part 1 of bind_m2(), which calls the parts in order.
void bind_m2_1(py::module_& m) {
py::class_<whiteout::m2::BoneOverride>(m, "BoneOverride", R"doc(One bone's replacement transform, from a `.bone` file.)doc")
.def(py::init<>())
.def_readwrite("bone_index", &whiteout::m2::BoneOverride::boneIndex, R"doc(Indexes Model::bones. Every id in the WoW corpus is below its model's bone count, and the ids within a file are strictly ascending.)doc")
;
py::class_<whiteout::m2::BoneOverrideSet>(m, "BoneOverrideSet", R"doc(A whole `.bone` file: the skeleton edits one customization choice needs.
On disk this is two parallel chunks — `BIDA` holds the bone ids and `BOMT` the matrices — but their lengths match in every corpus file, so they are paired here and split again on write.)doc")
.def(py::init<>())
.def_readwrite("version", &whiteout::m2::BoneOverrideSet::version, R"doc(1 in every known file.)doc")
.def_readwrite("overrides", &whiteout::m2::BoneOverrideSet::overrides, R"doc(Ascending by @ref BoneOverride::boneIndex, which is the order the files store and what lets the client binary-search a bone.)doc")
;
py::class_<whiteout::m2::Model>(m, "Model")
.def(py::init<>())
.def_readwrite("model_name", &whiteout::m2::Model::modelName)
.def_readwrite("global_flags", &whiteout::m2::Model::globalFlags)
.def_readwrite("global_loops", &whiteout::m2::Model::globalLoops)
.def_readwrite("sequences", &whiteout::m2::Model::sequences)
.def_readwrite("sequence_idx_hash_by_id", &whiteout::m2::Model::sequenceIdxHashById)
.def_readwrite("bones", &whiteout::m2::Model::bones)
.def_readwrite("key_bone_ids", &whiteout::m2::Model::keyBoneIds)
.def_readwrite("vertices", &whiteout::m2::Model::vertices)
.def_readwrite("skin_profiles", &whiteout::m2::Model::skinProfiles)
.def_readwrite("lod_profiles", &whiteout::m2::Model::lodProfiles)
.def_readwrite("num_skin_profiles", &whiteout::m2::Model::numSkinProfiles)
.def_readwrite("colors", &whiteout::m2::Model::colors)
.def_readwrite("textures", &whiteout::m2::Model::textures)
.def_readwrite("texture_weights", &whiteout::m2::Model::textureWeights)
.def_readwrite("texture_transforms", &whiteout::m2::Model::textureTransforms)
.def_readwrite("texture_indices_by_id", &whiteout::m2::Model::textureIndicesById)
.def_readwrite("materials", &whiteout::m2::Model::materials)
.def_readwrite("bone_combos", &whiteout::m2::Model::boneCombos)
.def_readwrite("texture_combos", &whiteout::m2::Model::textureCombos)
.def_readwrite("texture_coord_combos", &whiteout::m2::Model::textureCoordCombos)
.def_readwrite("texture_weight_combos", &whiteout::m2::Model::textureWeightCombos)
.def_readwrite("texture_transform_combos", &whiteout::m2::Model::textureTransformCombos)
.def_readwrite("bounding", &whiteout::m2::Model::bounding)
.def_readwrite("collision", &whiteout::m2::Model::collision)
.def_readwrite("collision_triangle_indices", &whiteout::m2::Model::collisionTriangleIndices)
.def_readwrite("collision_vertices", &whiteout::m2::Model::collisionVertices)
.def_readwrite("collision_face_normals", &whiteout::m2::Model::collisionFaceNormals)
.def_readwrite("attachments", &whiteout::m2::Model::attachments)
.def_readwrite("attachment_indices_by_id", &whiteout::m2::Model::attachmentIndicesById)
.def_readwrite("events", &whiteout::m2::Model::events)
.def_readwrite("lights", &whiteout::m2::Model::lights)
.def_readwrite("cameras", &whiteout::m2::Model::cameras)
.def_readwrite("camera_indices_by_id", &whiteout::m2::Model::cameraIndicesById)
.def_readwrite("ribbon_emitters", &whiteout::m2::Model::ribbonEmitters)
.def_readwrite("particle_emitters", &whiteout::m2::Model::particleEmitters)
.def_readwrite("texture_combiner_combos", &whiteout::m2::Model::textureCombinerCombos)
.def_readwrite("playable_animation_lookup", &whiteout::m2::Model::playableAnimationLookup, R"doc(One 4-byte record per animation id; vanilla/BC clients use it to pick fallback animations. Preserved verbatim so old files round-trip.)doc")
.def_readwrite("texture_flipbooks", &whiteout::m2::Model::textureFlipbooks, R"doc("Texture flipbooks" — unused even by old clients, preserved verbatim.)doc")
.def_readwrite("texture_ids", &whiteout::m2::Model::texture_ids, R"doc(TXID)doc")
.def_readwrite("lod_profile", &whiteout::m2::Model::lodProfile, R"doc(LDV1)doc")
.def_readwrite("parent_sequence_replacements", &whiteout::m2::Model::parentSequenceReplacements, R"doc(PABC)doc")
.def_readwrite("parent_texture_weights", &whiteout::m2::Model::parentTextureWeights, R"doc(PADC)doc")
.def_readwrite("parent_sequence_bounds", &whiteout::m2::Model::parentSequenceBounds, R"doc(PSBC)doc")
.def_readwrite("parent_event_data", &whiteout::m2::Model::parentEventData, R"doc(PEDC)doc")
.def_readwrite("recursive_particle_model_ids", &whiteout::m2::Model::recursiveParticleModelIds, R"doc(RPID)doc")
.def_readwrite("geometry_particle_model_ids", &whiteout::m2::Model::geometryParticleModelIds, R"doc(GPID)doc")
.def_readwrite("water_data", &whiteout::m2::Model::waterData, R"doc(WFV3)doc")
.def_readwrite("particle_geosets", &whiteout::m2::Model::particleGeosets, R"doc(PGD1)doc")
.def_readwrite("physics", &whiteout::m2::Model::physics, R"doc(PFDC, or a `.phys` sibling)doc")
.def_readwrite("physics_file_id", &whiteout::m2::Model::physicsFileId)
.def_readwrite("bone_overrides", &whiteout::m2::Model::boneOverrides, R"doc(One entry per customization choice, in BFID order — see bone_file.h.)doc")
.def_readwrite("bone_file_ids", &whiteout::m2::Model::boneFileIds, R"doc(BFID, kept so a model that named its `.bone` files by id keeps doing so. Parallel to @ref boneOverrides when both are present.)doc")
.def_readwrite("edge_fade_entries", &whiteout::m2::Model::edgeFadeEntries, R"doc(EDGF)doc")
.def_readwrite("nerf_entries", &whiteout::m2::Model::nerfEntries, R"doc(NERF)doc")
.def_readwrite("detailed_light_entries", &whiteout::m2::Model::detailedLightEntries, R"doc(DETL)doc")
.def_readwrite("debug_occlusion_entries", &whiteout::m2::Model::debugOcclusionEntries, R"doc(DBOC)doc")
.def_readwrite("anim_frame_data", &whiteout::m2::Model::animFrameData, R"doc(AFRA)doc")
.def_readwrite("physics_collision", &whiteout::m2::Model::physicsCollision, R"doc(PCOL)doc")
.def_readwrite("dpiv_data", &whiteout::m2::Model::dpivData, R"doc(DPIV (32 B per record))doc")
.def_readwrite("textured_light_entries", &whiteout::m2::Model::texturedLightEntries, R"doc(TEXL)doc")
;
py::class_<whiteout::m2::Parser>(m, "Parser")
.def(py::init<>())
.def("parse", py::overload_cast<whiteout::interfaces::VirtualPathFileSystem&, const std::string&>(&whiteout::m2::Parser::parse), py::arg("fs"), py::arg("filePath"))
.def("parse",
[](whiteout::m2::Parser& self, whiteout::interfaces::CascFileSystem& cascFs, py::bytes __py_bytes_1) {
std::string __s_1 = __py_bytes_1;
std::span<const whiteout::u8> buffer(reinterpret_cast<const whiteout::u8*>(__s_1.data()), __s_1.size());
return self.parse(cascFs, buffer);
}, py::arg("cascFs"), py::arg("buffer"))
.def("set_lazy_animations", &whiteout::m2::Parser::setLazyAnimations, py::arg("enable"), R"doc(Leave the keys of sequences stored in `.anim` siblings unread until m2::loadSequence() asks for them. Off by default.
This is what the client does — nothing reads a `.anim` until something plays that sequence — and on a character model with a hundred of them it is the difference between a load that reads one file and one that reads a hundred. See sequence_loader.h.
The @p fs passed to parse() has to outlive the returned Model, because the deferred reads go back through it.)doc")
.def("has_issues", &whiteout::m2::Parser::hasIssues)
.def("get_issues", &whiteout::m2::Parser::getIssues)
;
py::class_<whiteout::m2::WriteOptions>(m, "WriteOptions")
.def(py::init<>())
.def_readwrite("m2_version", &whiteout::m2::WriteOptions::m2Version)
.def_readwrite("emit_skeleton", &whiteout::m2::WriteOptions::emitSkeleton)
.def_readwrite("base_stem", &whiteout::m2::WriteOptions::baseStem)
;
py::class_<whiteout::m2::M2SerializeResult>(m, "SerializeResult")
.def(py::init<>())
.def_readwrite("m2_data", &whiteout::m2::M2SerializeResult::m2Data)
.def_readwrite("skeleton_data", &whiteout::m2::M2SerializeResult::skeletonData)
.def_readwrite("physics_data", &whiteout::m2::M2SerializeResult::physicsData)
;
py::class_<whiteout::m2::Writer>(m, "Writer")
.def(py::init<>())
.def(py::init<whiteout::m2::WriteOptions>(), py::arg("options"))
.def("write", py::overload_cast<whiteout::interfaces::VirtualPathFileSystem&, const std::string&, const whiteout::m2::Model&>(&whiteout::m2::Writer::write), py::arg("fs"), py::arg("filePath"), py::arg("model"))
.def("write", py::overload_cast<whiteout::interfaces::CascFileSystem&, const whiteout::m2::Model&>(&whiteout::m2::Writer::write), py::arg("cascFs"), py::arg("model"))
.def("write", py::overload_cast<const whiteout::m2::Model&>(&whiteout::m2::Writer::write), py::arg("model"))
.def("has_issues", &whiteout::m2::Writer::hasIssues)
.def("get_issues", &whiteout::m2::Writer::getIssues)
;
py::class_<whiteout::m2::AnimationTrack<whiteout::Vector3f>>(m, "AnimationTrackVector3f", R"doc(instantiate=Vector3f;CompatQuaternion;Quaternion;i16;u8;u16;f32;CameraSpline)doc")
.def(py::init<>())
.def_readwrite("interpolation_type", &whiteout::m2::AnimationTrack<whiteout::Vector3f>::interpolationType)
.def_readwrite("global_sequence_id", &whiteout::m2::AnimationTrack<whiteout::Vector3f>::globalSequenceId)
.def_readwrite("timestamps", &whiteout::m2::AnimationTrack<whiteout::Vector3f>::timestamps)
.def_readwrite("values", &whiteout::m2::AnimationTrack<whiteout::Vector3f>::values)
;
py::class_<whiteout::m2::AnimationTrack<whiteout::m2::CompatQuaternion>>(m, "AnimationTrackM2CompatQuaternion", R"doc(instantiate=Vector3f;CompatQuaternion;Quaternion;i16;u8;u16;f32;CameraSpline)doc")
.def(py::init<>())
.def_readwrite("interpolation_type", &whiteout::m2::AnimationTrack<whiteout::m2::CompatQuaternion>::interpolationType)
.def_readwrite("global_sequence_id", &whiteout::m2::AnimationTrack<whiteout::m2::CompatQuaternion>::globalSequenceId)
.def_readwrite("timestamps", &whiteout::m2::AnimationTrack<whiteout::m2::CompatQuaternion>::timestamps)
.def_readwrite("values", &whiteout::m2::AnimationTrack<whiteout::m2::CompatQuaternion>::values)
;
py::class_<whiteout::m2::AnimationTrack<whiteout::i16>>(m, "AnimationTrackI16", R"doc(instantiate=Vector3f;CompatQuaternion;Quaternion;i16;u8;u16;f32;CameraSpline)doc")
.def(py::init<>())
.def_readwrite("interpolation_type", &whiteout::m2::AnimationTrack<whiteout::i16>::interpolationType)
.def_readwrite("global_sequence_id", &whiteout::m2::AnimationTrack<whiteout::i16>::globalSequenceId)
.def_readwrite("timestamps", &whiteout::m2::AnimationTrack<whiteout::i16>::timestamps)
.def_readwrite("values", &whiteout::m2::AnimationTrack<whiteout::i16>::values)
;
py::class_<whiteout::m2::AnimationTrack<whiteout::Quaternion>>(m, "AnimationTrackQuaternion", R"doc(instantiate=Vector3f;CompatQuaternion;Quaternion;i16;u8;u16;f32;CameraSpline)doc")
.def(py::init<>())
.def_readwrite("interpolation_type", &whiteout::m2::AnimationTrack<whiteout::Quaternion>::interpolationType)
.def_readwrite("global_sequence_id", &whiteout::m2::AnimationTrack<whiteout::Quaternion>::globalSequenceId)
.def_readwrite("timestamps", &whiteout::m2::AnimationTrack<whiteout::Quaternion>::timestamps)
.def_readwrite("values", &whiteout::m2::AnimationTrack<whiteout::Quaternion>::values)
;
py::class_<whiteout::m2::AnimationTrack<whiteout::f32>>(m, "AnimationTrackF32", R"doc(instantiate=Vector3f;CompatQuaternion;Quaternion;i16;u8;u16;f32;CameraSpline)doc")
.def(py::init<>())
.def_readwrite("interpolation_type", &whiteout::m2::AnimationTrack<whiteout::f32>::interpolationType)
.def_readwrite("global_sequence_id", &whiteout::m2::AnimationTrack<whiteout::f32>::globalSequenceId)
.def_readwrite("timestamps", &whiteout::m2::AnimationTrack<whiteout::f32>::timestamps)
.def_readwrite("values", &whiteout::m2::AnimationTrack<whiteout::f32>::values)
;
py::class_<whiteout::m2::AnimationTrack<whiteout::u8>>(m, "AnimationTrackU8", R"doc(instantiate=Vector3f;CompatQuaternion;Quaternion;i16;u8;u16;f32;CameraSpline)doc")
.def(py::init<>())
.def_readwrite("interpolation_type", &whiteout::m2::AnimationTrack<whiteout::u8>::interpolationType)
.def_readwrite("global_sequence_id", &whiteout::m2::AnimationTrack<whiteout::u8>::globalSequenceId)
.def_readwrite("timestamps", &whiteout::m2::AnimationTrack<whiteout::u8>::timestamps)
.def_readwrite("values", &whiteout::m2::AnimationTrack<whiteout::u8>::values)
;
py::class_<whiteout::m2::AnimationTrack<whiteout::m2::CameraSpline>>(m, "AnimationTrackM2CameraSpline", R"doc(instantiate=Vector3f;CompatQuaternion;Quaternion;i16;u8;u16;f32;CameraSpline)doc")
.def(py::init<>())
.def_readwrite("interpolation_type", &whiteout::m2::AnimationTrack<whiteout::m2::CameraSpline>::interpolationType)
.def_readwrite("global_sequence_id", &whiteout::m2::AnimationTrack<whiteout::m2::CameraSpline>::globalSequenceId)
.def_readwrite("timestamps", &whiteout::m2::AnimationTrack<whiteout::m2::CameraSpline>::timestamps)
.def_readwrite("values", &whiteout::m2::AnimationTrack<whiteout::m2::CameraSpline>::values)
;
py::class_<whiteout::m2::AnimationTrack<whiteout::u16>>(m, "AnimationTrackU16", R"doc(instantiate=Vector3f;CompatQuaternion;Quaternion;i16;u8;u16;f32;CameraSpline)doc")
.def(py::init<>())
.def_readwrite("interpolation_type", &whiteout::m2::AnimationTrack<whiteout::u16>::interpolationType)
.def_readwrite("global_sequence_id", &whiteout::m2::AnimationTrack<whiteout::u16>::globalSequenceId)
.def_readwrite("timestamps", &whiteout::m2::AnimationTrack<whiteout::u16>::timestamps)
.def_readwrite("values", &whiteout::m2::AnimationTrack<whiteout::u16>::values)
;
py::class_<whiteout::m2::ParticleAnimationTrack<whiteout::Vector3f>>(m, "ParticleAnimationTrackVector3f")
.def(py::init<>())
.def_readwrite("values", &whiteout::m2::ParticleAnimationTrack<whiteout::Vector3f>::values)
;
py::class_<whiteout::m2::ParticleAnimationTrack<whiteout::Vector2f>>(m, "ParticleAnimationTrackVector2f")
.def(py::init<>())
.def_readwrite("values", &whiteout::m2::ParticleAnimationTrack<whiteout::Vector2f>::values)
;
py::bind_vector<std::vector<whiteout::i16>>(m, "VectorI16", py::buffer_protocol());
py::bind_vector<std::vector<std::vector<whiteout::u32>>>(m, "VectorVectorU32");
py::bind_vector<std::vector<std::vector<whiteout::Quaternion>>>(m, "VectorVectorQuaternion");
py::bind_vector<std::vector<std::vector<whiteout::Vector3f>>>(m, "VectorVectorVector3f");
py::bind_vector<std::vector<std::vector<whiteout::f32>>>(m, "VectorVectorF32");
py::bind_vector<std::vector<std::vector<whiteout::i16>>>(m, "VectorVectorI16");
py::bind_vector<std::vector<std::vector<whiteout::m2::CameraSpline>>>(m, "VectorVectorM2CameraSpline");
py::bind_vector<std::vector<std::vector<whiteout::m2::CompatQuaternion>>>(m, "VectorVectorM2CompatQuaternion");
py::bind_vector<std::vector<std::vector<whiteout::u16>>>(m, "VectorVectorU16");
py::bind_vector<std::vector<std::vector<whiteout::u8>>>(m, "VectorVectorU8");
py::bind_vector<std::vector<whiteout::m2::AnimationTrackBase>>(m, "VectorM2AnimationTrackBase");
py::bind_vector<std::vector<whiteout::m2::Attachment>>(m, "VectorM2Attachment");
py::bind_vector<std::vector<whiteout::m2::Batch>>(m, "VectorM2Batch");
py::bind_vector<std::vector<whiteout::m2::Bone>>(m, "VectorM2Bone");
py::bind_vector<std::vector<whiteout::m2::BoneOverride>>(m, "VectorM2BoneOverride");
}