Selaa lähdekoodia

Merge pull request #1615 from rgngl/encoderWeightFix

Encoder blend weight fix
Sean Taylor 11 vuotta sitten
vanhempi
sitoutus
56056e69d8
2 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. 1 0
      .gitignore
  2. 1 1
      tools/encoder/src/FBXUtil.cpp

+ 1 - 0
.gitignore

@@ -181,3 +181,4 @@ gameplay.xcworkspace/xcshareddata/gameplay.xccheckout
 
 /tools/encoder/windows
 /tools/luagen/windows
+/tools/encoder/gameplay-encoder.xcodeproj/project.xcworkspace/

+ 1 - 1
tools/encoder/src/FBXUtil.cpp

@@ -395,10 +395,10 @@ void loadVertexColor(FbxMesh* fbxMesh, int vertexIndex, int controlPointIndex, V
 void loadBlendData(const vector<Vector2>& vertexWeights, Vertex* vertex)
 {
     size_t size = vertexWeights.size();
+    vertex->hasWeights= true;
 
     if (size >= 1)
     {
-        vertex->hasWeights= true;
         vertex->blendIndices.x = vertexWeights[0].x;
         vertex->blendWeights.x = vertexWeights[0].y;
     }