Advertisement
expired6978

ccccc

Jun 13th, 2014
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. string bone = "";
  2. vector<string> shapes;
  3. vector<string> nifBones;
  4. vector<string> skelBones;
  5. if (!AnimSkeleton::getInstance().GetActiveBoneNames(skelBones))
  6. return;
  7.  
  8. NifFile nif;
  9. if(IsOutfit) {
  10. nif = workNif;
  11. OutfitShapes(outfitShapes);
  12. } else {
  13. nif = baseNif;
  14. RefShapes(outfitShapes);
  15. }
  16.  
  17. if (!nif.GetShapeList(shapes))
  18. return;
  19. for (auto s: shapes) {
  20. if (!workNif.GetShapeBoneList(s, nifBones))
  21. return;
  22. for (auto nb: nifBones) {
  23. auto it = find_if(skelBones.begin(), skelBones.end(), [&](string & sb){ return _stricmp(sb.c_str(), nb.c_str()) == 0; });
  24. if(it != skelBones.end()) {
  25. bone = *it;
  26. break;
  27. }
  28. }
  29. if (bone != "")
  30. break;
  31. nifBones.clear();
  32. }
  33.  
  34. if (bone == "") {
  35. wxMessageBox("No matching comparison bone found!", "Error");
  36. return;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement