コード例 #1
0
        public bool OnImport(string filename)
        {
            try
            {
                Model.LoadModel(Data.Buffer, Node.FileIndex);
                Model model = new Model(Node.FileIndex);
                model.Light(64, 768, -50, -10, -50, true);
                model_viewer.SelectedModel = model;
            }
            catch (Exception)
            {
                return(false);
            }

            return(true);
        }
コード例 #2
0
        public void PluginSelected()
        {
            if (!initialized)
            {
                initialized = true;
                Rasterizer.LoadTextures(Cache);
                Rasterizer.ApplyBrightness(0.59999999999999998D);
                Rasterizer.ResetTextures();
            }

            model_viewer.UpdateBuffer();

            try
            {
                Model.LoadModel(Data.Buffer, Node.FileIndex);
                Model model = new Model(Node.FileIndex);
                model.Light(64, 768, -50, -10, -50, true);
                model_viewer.SelectedModel = model;
            }
            catch (Exception)
            {
                model_viewer.SelectedModel = null;
            }
        }