예제 #1
0
        private void button_Save_Click(object sender, EventArgs e)
        {
            SaveFileDialog dlg = new SaveFileDialog();

            dlg.InitialDirectory = EditorManager.Project.ProjectDir;
            dlg.Filter           = "dds files|*.dds";
            dlg.FileName         = _outFile;
            if (dlg.ShowDialog(this) != DialogResult.OK)
            {
                return;
            }
            if (!EditorManager.Project.CheckRelative(dlg.FileName))
            {
                EditorManager.ShowMessageBox(
                    "The specified path cannot be accessed from this project. Please choose a path below the project directory or below one of the asset libraries included by this project.",
                    "Cannot access path from project", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }

            int iSize = int.Parse(comboBox_Size.Text);

            _outFile = dlg.FileName;
            string error = ColorGradingTool.CreateGradingLUT(_filenameOrig, _filenameTarget, _outFile, iSize);

            if (!string.IsNullOrEmpty(error))
            {
                EditorManager.ShowMessageBox("Cannot generate 3D texture : \n\n" + error, "Operation failed", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void button_Save_Click(object sender, EventArgs e)
        {
            SaveFileDialog dlg = new SaveFileDialog();

            dlg.InitialDirectory = EditorManager.Project.ProjectDir;
            dlg.Filter           = "dds files|*.dds";
            dlg.FileName         = _outFile;
            if (dlg.ShowDialog(this) != DialogResult.OK)
            {
                return;
            }
            int iSize = int.Parse(comboBox_Size.Text);

            _outFile = dlg.FileName;
            string error = ColorGradingTool.CreateGradingLUT(_filenameOrig, _filenameTarget, _outFile, iSize);

            if (!string.IsNullOrEmpty(error))
            {
                EditorManager.ShowMessageBox("Cannot generate 3D texture : \n\n" + error, "Operation failed", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }