Skip to content

Commit

Permalink
[Collada] fixed errornous "skipping empty mesh" warnings in case of l…
Browse files Browse the repository at this point in the history
…ine geometries
  • Loading branch information
luithefirst committed Jun 18, 2024
1 parent 2787369 commit 371d539
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/Aardvark.Data.Collada/ColladaImporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,6 @@ public static Dictionary<string, List<PolyMesh>> GetGeometries(COLLADA collada)
var polygons = item as polygons;
var lines = item as lines;

var count = triangles != null ? triangles.count :
polylist != null ? polylist.count :
polygons != null ? polygons.count :
0;

if (count < 1)
{
Report.Warn("skipping empty mesh with {0} primitives", count);
continue;
}

var input = triangles != null ? triangles.input :
polylist != null ? polylist.input :
polygons != null ? polygons.input :
Expand All @@ -142,6 +131,17 @@ public static Dictionary<string, List<PolyMesh>> GetGeometries(COLLADA collada)
//throw new NotImplementedException("since I had no example i could not implement this one properly ([email protected])");
}

var count = triangles != null ? triangles.count :
polylist != null ? polylist.count :
polygons != null ? polygons.count :
0;

if (count < 1)
{
Report.Warn("skipping empty geometry with {0} primitives", count);
continue;
}

// init mesh from input and sources
var mesh = new PolyMesh();
ProcessInputs(input.SelectMany(i =>
Expand Down

0 comments on commit 371d539

Please sign in to comment.