浏览代码

FBX: better error message when animation is not properly baked

trethaller 7 年之前
父节点
当前提交
2aa8b12080
共有 1 个文件被更改,包括 2 次插入1 次删除
  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);