Esempio n. 1
0
        static void Export(System.Action <string> WriteLine, FbxObjectManager ObjectManager)
        {
            var ObjectPropertys = new FbxProperty("Objects");

            foreach (var Object in ObjectManager.Objects)
            {
                ObjectPropertys.AddProperty(Object.Definition);
            }
            Export(WriteLine, ObjectPropertys);
        }
Esempio n. 2
0
        static FbxProperty GetHeaderProperty(string Creator = "Pop FbxAscii Exporter")
        {
            var Root = new FbxProperty("FBXHeaderExtension");

            Root.AddProperty("FBXHeaderVersion", 1003);
            Root.AddProperty("FBXVersion", Version);
            Root.AddProperty("Creator", Creator);

            //	won't load in unity without this comment at the top
            Root.AddComment("FBX " + VersionMajor + "." + VersionMinor + "." + VersionRelease.ToString("D2") + "  project file");
            return(Root);
        }
Esempio n. 3
0
        static void Export(System.Action <string> WriteLine, FbxConnectionManager ConnectionsManager)
        {
            var ConnectionsProp = new FbxProperty("Connections");

            foreach (var Connection in ConnectionsManager.Connections)
            {
                //	meshes need "Connect", anims need "C"
                //	id vs name?
                var ConnectionProp = ConnectionsProp.AddProperty(Connection.ConnectionType.ToString());

                var Desc = string.Format("{0}::{1} -> {2}::{3}", Connection.type1, Connection.name1, Connection.type2, Connection.name2);
                ConnectionProp.AddComment("");
                ConnectionProp.AddComment(Desc);

                ConnectionProp.AddValue(Connection.Relation.ToString());

                /*
                 * if (Connection.ConnectionType == FbxConnectionType.Connect)
                 * {
                 *      ConnectionProp.AddValue(Connection.name1);
                 *      ConnectionProp.AddValue(Connection.name2);
                 *      //	"Model::" + ((Mesh)Value).name);
                 *      //	"Material::" + ((Material)Value).name);
                 * }
                 * else */if (Connection.ConnectionType == FbxConnectionType.C)
                {
                    ConnectionProp.AddValue(Connection.Object1.Ident);
                    ConnectionProp.AddValue(Connection.Object2.Ident);
                }

                if (Connection.PropertyName != null)
                {
                    ConnectionProp.AddValue(Connection.PropertyName);
                }
            }
            Export(WriteLine, ConnectionsProp);
        }
Esempio n. 4
0
 public FbxValue_Property(FbxProperty Property)
 {
     this.Property = Property;
 }
Esempio n. 5
0
 public FbxObject(int Ident, string TypeName, string ObjectName = null)
 {
     this.ExplicitObjectName = ObjectName;
     this.Ident      = Ident;
     this.Definition = new FbxProperty(TypeName);
 }