فهرست منبع

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;
 				t += minDT;
 			}
 			}
 			allTimes.sort(Reflect.compare);
 			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);
 		var anim = new h3d.anim.LinearAnimation(animName, numFrames, sampling);