Added ChannelMixer

This commit is contained in:
Misaki
2024-12-26 19:48:31 +09:00
parent 2a455513bc
commit b00b63cfb4
30 changed files with 284 additions and 61 deletions

View File

@@ -0,0 +1,33 @@
using UnityEditor;
using UnityEngine;
namespace Misaki.ArtToolEditor
{
internal class ChannelMixerMenu
{
[MenuItem("Assets/Art Tools/Texture Helpers/Channel Mixer", true)]
public static bool ChannelMixerValidator()
{
foreach (var selectedObject in Selection.objects)
{
if (selectedObject is not Texture2D)
{
return false;
}
}
return true;
}
[MenuItem("Assets/Art Tools/Texture Helpers/Channel Mixer")]
public static void ChannelMixer()
{
var window = EditorWindow.GetWindow<OutputOptionsWindow>(true, "Channel Mixer Output Options");
window.WithItemSource(Selection.objects);
window.RegisterVisualProvider<ChannelMixerVisualProvider>();
window.RegisterProcessor<ChannelMixerProcessor>();
window.InitializeAndShow();
}
}
}