diff --git a/src/Aardvark.Data.Collada/ColladaImporter.cs b/src/Aardvark.Data.Collada/ColladaImporter.cs index fc2e08f..fa9797b 100644 --- a/src/Aardvark.Data.Collada/ColladaImporter.cs +++ b/src/Aardvark.Data.Collada/ColladaImporter.cs @@ -115,17 +115,6 @@ public static Dictionary> 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> GetGeometries(COLLADA collada) //throw new NotImplementedException("since I had no example i could not implement this one properly (haaser@vrvis.at)"); } + 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 =>