Example #1
0
        public NodeConverterBase(FbxRootNode root, NotificationHandler onNotification)
        {
            this._root          = root;
            this.OnNotification = onNotification;

            this.checkFileSections();
        }
Example #2
0
        public static INodeConverter GetConverter(FbxRootNode root, NotificationHandler onNotification)
        {
            INodeConverter converter = null;

            switch (root.Version)
            {
            case FbxVersion.v2000:
            case FbxVersion.v2001:
            case FbxVersion.v3000:
            case FbxVersion.v3001:
            case FbxVersion.v4000:
            case FbxVersion.v4001:
            case FbxVersion.v4050:
            case FbxVersion.v5000:
            case FbxVersion.v5800:
                throw new NotSupportedException($"Fbx version {root.Version} not supported");

            case FbxVersion.v6000:
            case FbxVersion.v6100:
                throw new NotImplementedException($"Fbx version {root.Version} not implemented");

            case FbxVersion.v7000:
            case FbxVersion.v7100:
            case FbxVersion.v7200:
            case FbxVersion.v7300:
            case FbxVersion.v7400:
                converter = new NodeConverter7400(root, onNotification);
                break;

            case FbxVersion.v7500:
            case FbxVersion.v7600:
            case FbxVersion.v7700:
                converter = new NodeConverter7400(root, onNotification);
                break;

            default:
                throw new Exception($"Unknown fbx version : {root.Version}");
            }

            //TODO: check the versions differences to implement the missing converters

            return(converter);
        }
Example #3
0
        public FbxRootNode ToRootNode()
        {
            _root         = new FbxRootNode();
            _root.Version = this.Version;

            _root.Nodes.Add(new FBXHeader(this.Version).ToNode());
            _root.Nodes.Add(new GlobalSettings(this.Version).ToNode());
            _root.Nodes.Add(buildDocumentsNode());

            buildReferncesNode();
            buildDefinitionsNode();
            buildConnections();
            buildObjectsNode();

            addDefinition("GlobalSettings");

            _root.Nodes.Add(_references);
            _root.Nodes.Add(_definitions);
            _root.Nodes.Add(_objects);
            _root.Nodes.Add(_connections);

            return(_root);
        }
Example #4
0
 public NodeConverter7400(FbxRootNode root, NotificationHandler onNotification) : base(root, onNotification)
 {
 }