mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-11-04 03:56:39 +00:00 
			
		
		
		
	Also cleaned up some #includes Removed a few asserts. Vector already throws an out_of_range error.
		
			
				
	
	
		
			29 lines
		
	
	
	
		
			638 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
	
		
			638 B
		
	
	
	
		
			C++
		
	
	
	
	
	
#include "data.hpp"
 | 
						|
#include "node.hpp"
 | 
						|
 | 
						|
namespace Nif
 | 
						|
{
 | 
						|
void NiSkinInstance::post(NIFFile *nif)
 | 
						|
{
 | 
						|
    data.post(nif);
 | 
						|
    root.post(nif);
 | 
						|
    bones.post(nif);
 | 
						|
 | 
						|
    if(data.empty() || root.empty())
 | 
						|
        nif->fail("NiSkinInstance missing root or data");
 | 
						|
 | 
						|
    size_t bnum = bones.length();
 | 
						|
    if(bnum != data->bones.size())
 | 
						|
        nif->fail("Mismatch in NiSkinData bone count");
 | 
						|
 | 
						|
    root->makeRootBone(&data->trafo);
 | 
						|
 | 
						|
    for(size_t i=0; i<bnum; i++)
 | 
						|
    {
 | 
						|
        if(bones[i].empty())
 | 
						|
            nif->fail("Oops: Missing bone! Don't know how to handle this.");
 | 
						|
        bones[i]->makeBone(i, data->bones[i]);
 | 
						|
    }
 | 
						|
}
 | 
						|
 | 
						|
} // Namespace
 |