Skip to content
Snippets Groups Projects
Commit 392e13ac authored by Tazpn's avatar Tazpn
Browse files

Add Veryxrv's commit. Still needs investigation to make sure MW and Civ4 are not effected.

parent 7770d1e1
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment