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