2
0
Эх сурвалжийг харах

don't list animations not exported

ncannasse 6 жил өмнө
parent
commit
4aeb48bdab

+ 6 - 5
hxd/fmt/fbx/BaseLibrary.hx

@@ -205,7 +205,7 @@ class BaseLibrary {
 		var originScale = 1;
 		var upAxis = 1;
 		var originAxis = 2;
-		for( p in root.getAll("GlobalSettings.Properties70.P") ) {			
+		for( p in root.getAll("GlobalSettings.Properties70.P") ) {
 			switch( p.props[0].toString() ) {
 			case "UnitScaleFactor": unitScale = p.props[4].toInt();
 			case "OriginalUnitScaleFactor": originScale = p.props[4].toInt();
@@ -227,7 +227,7 @@ class BaseLibrary {
 			}
 		if( app.indexOf("Blender") >= 0 && unitScale == 1 && originScale == 1 )
 			scaleFactor *= 0.01; // Blender in meters exports FBX to centimeter
-		
+
 		if( scaleFactor == 1 && geometryScaleFactor == 1 )
 			return;
 
@@ -255,8 +255,8 @@ class BaseLibrary {
 
 		if( scaleFactor == 1 )
 			return;
-		
-		// scale on root models			
+
+		// scale on root models
 		for( m in this.root.getAll("Objects.Model") ) {
 			var isRoot = getParent(m,"Model",true) == null;
 			for( p in m.getAll("Properties70.P") )
@@ -736,7 +736,8 @@ class BaseLibrary {
 	public function getAnimationNames() : Array<String> {
 		var names = [];
 		for ( a in this.root.getAll("Objects.AnimationStack") ) {
-			names.push(a.getName());
+			if( getChilds(a, "AnimationLayer").length > 0 )
+				names.push(a.getName());
 		}
 		return names;
 	}