diff --git a/NifExport/Animation.cpp b/NifExport/Animation.cpp index 815422846aabce60daf5afed0154739264a3132c..f19e6eb09365210b951de88acf9c56a82cc118ff 100644 --- a/NifExport/Animation.cpp +++ b/NifExport/Animation.cpp @@ -144,6 +144,16 @@ void Exporter::InitializeTimeController(NiTimeControllerRef ctrl, NiNodeRef pare NiNodeRef Exporter::createAccumNode(NiNodeRef parent, INode *node) { + // + //Tweak by veryxRV + // + NiNodeRef root= parent->GetParent(); + NiNodeRef temp; + while(root->GetParent() != NULL) + { + temp= root->GetParent(); + root= temp; + } NiNodeRef accumNode; bool isTracked = isNodeTracked(node); if (!Exporter::mAllowAccum || (!isTracked && !isSkeletonRoot(node))) @@ -178,10 +188,12 @@ NiNodeRef Exporter::createAccumNode(NiNodeRef parent, INode *node) vector<NiNodeRef> children; getChildNodes(node, children); ctrl->SetExtraTargets(children); - Exporter::InitializeTimeController(ctrl, parent); + //Changed parent to root for ingame compatibility + Exporter::InitializeTimeController(ctrl, root); } NiControllerManagerRef mgr = new NiControllerManager(); - Exporter::InitializeTimeController(mgr, parent); + //Changed parent to root for ingame compatibility + Exporter::InitializeTimeController(mgr, root); // Export Animation now doAnimExport(mgr, node);