示例#1
0
        private void DrawColorGradingConvertButton()
        {
            GUILayout.Space(5);
            if (GUILayout.Button("Convert") == false)
            {
                return;
            }

            if (inputLUT == null)
            {
                messageType    = MessageType.Error;
                helpBoxMessage = "Please supply an input lookup texture";
                return;
            }

            TextureImporter importer  = (TextureImporter)TextureImporter.GetAtPath(inputPath);
            Texture2D       converted = ColorGrading.Convert(inputLUT, compatibilityMode, importer.linearTexture);

            //Remove file extension and add "_Scion.png"
            string newPath = inputPath.Substring(0, inputPath.LastIndexOf(".")) + "_Scion.png";

            SaveLookupTexture(newPath, converted);

            helpBoxMessage = "Saved converted lookup texture: " + newPath;
            messageType    = MessageType.Info;
            Debug.Log(helpBoxMessage);
        }
示例#2
0
        private void DrawColorGradingConvertButton()
        {
            GUILayout.Space(10);
            if (GUILayout.Button("Convert") == false)
            {
                return;
            }

            if (inputLUT == null)
            {
                messageType    = MessageType.Error;
                helpBoxMessage = "Please supply an input lookup texture";
                return;
            }

            Texture2D converted = ColorGrading.Convert(inputLUT, compatibilityMode);
            string    newPath   = inputPath + "_Scion.png";

            SaveLookupTexture(newPath, converted);

            helpBoxMessage = "Saved converted lookup texture: " + newPath;
            messageType    = MessageType.Info;
            Debug.Log(helpBoxMessage);
        }