Преглед на файлове

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);