Browse Source

FBX: better error message when animation is not properly baked

trethaller 7 years ago
parent
commit
2aa8b12080
1 changed files with 2 additions and 1 deletions
  1. 2 1
      hxd/fmt/fbx/BaseLibrary.hx

+ 2 - 1
hxd/fmt/fbx/BaseLibrary.hx

@@ -800,7 +800,8 @@ class BaseLibrary {
 				t += minDT;
 			}
 			allTimes.sort(Reflect.compare);
-			if( allTimes.length != numFrames ) throw "assert";
+			if( allTimes.length > numFrames ) throw 'Animation $animName is not baked on a fixed framerate (detected ${Std.int(sampling)})';
+			if( allTimes.length < numFrames ) throw "assert";
 		}
 
 		var anim = new h3d.anim.LinearAnimation(animName, numFrames, sampling);