Пример #1
0
 private static void ImportDAEFile(ResourceWrapper res, string path)
 {
     var ctx = new Assimp.AssimpContext();
     res.WrappedObject = new RWScene(ctx.ImportFile(path));
 }
Пример #2
0
 private static void ExportOBJFile(ResourceWrapper res, string path)
 {
     var scene = (res as RWSceneWrapper).WrappedObject;
     var ctx = new Assimp.AssimpContext();
     ctx.ExportFile(RWScene.ToAssimpScene(scene), path, "obj");
 }
Пример #3
0
        internal override void InitializeWrapper()
        {
            Nodes.Clear();

            int idx = 0;
            foreach (AMDChunk chunk in WrappedObject.Chunks)
            {
                var wrap = new ResourceWrapper(string.Format("{0}[{1}]", chunk.Tag, idx++), new GenericBinaryFile(chunk.Data), SupportedFileType.Resource, true);
                wrap.m_canReplace = false;
                wrap.m_canRename = false;
                wrap.InitializeContextMenuStrip();

                Nodes.Add(wrap);
            }

            base.InitializeWrapper();
        }