|
@@ -7,6 +7,7 @@ enum FbxProp {
|
|
PIdent( i : String );
|
|
PIdent( i : String );
|
|
PInts( v : Array<Int> );
|
|
PInts( v : Array<Int> );
|
|
PFloats( v : Array<Float> );
|
|
PFloats( v : Array<Float> );
|
|
|
|
+ PBinary( v : haxe.io.Bytes );
|
|
}
|
|
}
|
|
|
|
|
|
typedef FbxNode = {
|
|
typedef FbxNode = {
|
|
@@ -128,6 +129,14 @@ class FbxTools {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public static function toBinary( n : FbxProp ) {
|
|
|
|
+ if ( n == null ) throw "null prop";
|
|
|
|
+ return switch( n ) {
|
|
|
|
+ case PBinary(v): v;
|
|
|
|
+ default: throw "Invalid prop " + n;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
public static function getId( n : FbxNode ) {
|
|
public static function getId( n : FbxNode ) {
|
|
if( n.props.length != 3 )
|
|
if( n.props.length != 3 )
|
|
throw n.name + " is not an object";
|
|
throw n.name + " is not an object";
|