Skip to content
Snippets Groups Projects
Commit 4aec784a authored by Alecu100's avatar Alecu100
Browse files

more fixes to niflib, last commit didn't submit the complexshape updates

parent 30afda29
No related branches found
No related tags found
No related merge requests found
......@@ -177,7 +177,8 @@ public:
Matrix44 & transform,
int max_bones_per_partition = 4,
bool stripify = false,
bool tangent_space = false
bool tangent_space = false,
float min_vertex_weight = 0.001f
) const;
/*
......
......@@ -526,7 +526,7 @@ void ComplexShape::Merge( NiAVObject * root ) {
//Done Merging
}
Ref<NiAVObject> ComplexShape::Split( NiNode * parent, Matrix44 & transform, int max_bones_per_partition, bool stripify, bool tangent_space ) const {
Ref<NiAVObject> ComplexShape::Split( NiNode * parent, Matrix44 & transform, int max_bones_per_partition, bool stripify, bool tangent_space, float min_vertex_weight ) const {
//Make sure parent is not NULL
if ( parent == NULL ) {
......@@ -744,7 +744,7 @@ Ref<NiAVObject> ComplexShape::Split( NiNode * parent, Matrix44 & transform, int
SkinWeight sk;
for ( map<NiNodeRef, float>::iterator wt = cv->weights.begin(); wt != cv->weights.end(); ++wt ) {
//Only record influences that make a noticable contribution
if ( wt->second > 0.1f ) {
if ( wt->second > min_vertex_weight ) {
sk.index = vert_index;
sk.weight = wt->second;
if ( shapeWeights.find( wt->first ) == shapeWeights.end() ) {
......
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