Skip to content

Commit

Permalink
Fixed a REALLY stupid bug where I had broken vertex exporting if ther…
Browse files Browse the repository at this point in the history
…e was only 1 color or 1 UV.
  • Loading branch information
MeltyPlayer committed Feb 24, 2024
1 parent 90a18ac commit d1239d9
Show file tree
Hide file tree
Showing 38 changed files with 26 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,19 @@ public static Type GetMaterialType(int colorCount, int uvCount) {
: typeof(VertexTexture2);
}

return colorCount == 1 && uvCount == 1
? typeof(VertexColor1Texture1)
: typeof(VertexEmpty);
if (colorCount == 1 && uvCount == 1) {
return typeof(VertexColor1Texture1);
}

if (colorCount == 1) {
return typeof(VertexColor1);
}

if (uvCount == 1) {
return typeof(VertexTexture1);
}

return typeof(VertexEmpty);
}

public static Type GetSkinningType(int weightCount)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,19 @@ private static IVertexMaterial GetVertexMaterial_(
: new VertexTexture2(uv0, uv1);
}

return colorCount == 1 && uvCount == 1
? new VertexColor1Texture1(color0, uv0)
: new VertexEmpty();
if (colorCount == 1 && uvCount == 1) {
return new VertexColor1Texture1(color0, uv0);
}

if (colorCount == 1) {
return new VertexColor1(color0);
}

if (uvCount == 1) {
return new VertexTexture1(uv0);
}

return new VertexEmpty();
}

private static Vector4 FinToGltfColor_(IColor? color)
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d1239d9

Please sign in to comment.