-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Collada] fixed errornous "skipping empty mesh" warnings in case of l…
…ine geometries
- Loading branch information
1 parent
2787369
commit 371d539
Showing
1 changed file
with
11 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 : | ||
|
@@ -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 => | ||
|