diff --git a/nif/controller.d b/nif/controller.d index d65fe37aa..b9e00ec53 100644 --- a/nif/controller.d +++ b/nif/controller.d @@ -219,7 +219,6 @@ class NiUVController : Controller } } -//* // If there was more than four of these, I would template it. class NiKeyframeController : Controller { diff --git a/ogre/meshloader.d b/ogre/meshloader.d index 2251162a1..3490da08b 100644 --- a/ogre/meshloader.d +++ b/ogre/meshloader.d @@ -66,6 +66,8 @@ struct MeshLoader { baseName = name; + writefln("Loading mesh '%s'", name); + // Check if the first record is a node Node n = cast(Node) nifMesh.records[0]; @@ -134,9 +136,12 @@ struct MeshLoader NiStringExtraData d = cast(NiStringExtraData) data.extra; if(d !is null) { + // Marker objects are only visible in the editor. We + // completely ignore them. if(d.string == "MRK") return; + // No collision if(d.string == "NCO") flags |= 0x800; // Temporary internal marker } @@ -150,6 +155,47 @@ struct MeshLoader // skeleton. The nodes can then be moved one by one over to the // appropriate bones. + // Check the controller + auto cont = data.controller; + while(cont !is null) + { + auto kc = cast(NiKeyframeController)data.controller; + auto pc = cast(NiPathController)data.controller; + if(kc !is null) + { + writefln("Found keyframe controller"); + writefln(" Node name was: %s", data.name); + assert(cont.target is data); + + auto kcd = kc.data; + writefln(" Types: %s %s %s", + kcd.rotType, kcd.traType, kcd.scaleType); + + /* + Adding keyframes: + + Skeleton -> Animation -> NodeAnimationTrack nt; + + TransformKeyFrame * tf = nt->createNodeKeyFrame(time); + tf->setTranslate(Vector3); + tf->setScale(Vector3); + tf->setRotation(Quaternion); + + nt->applyToNode(node, time); + evt + Animation an; + an->apply(skeleton, time); + */ + } + else if(pc !is null) + { + writefln("Found path controller"); + assert(cont.target is data); + } + else writefln("Other controller (%s)", cont); + cont = cont.next; + } + // Loop through children foreach(Node n; data.children) insertNode(n, node, flags); diff --git a/sound/cpp_avcodec.cpp b/sound/cpp_avcodec.cpp index 3424655a7..bd64fcb0f 100644 --- a/sound/cpp_avcodec.cpp +++ b/sound/cpp_avcodec.cpp @@ -25,16 +25,8 @@ #include extern "C" { // the headers don't do this.. -#ifdef WIN32 #include #include -#else -// FIXME: This works on Ubuntu (given the switches from pkg-config), -// but apparently there are some problems on other systems (eg -// Archlinux). -#include -#include -#endif } #include