Files
com.misaki.art-tools/Editor/AssetsHelpers/Implementation/Texture/ChannelMixer/ChannelMixerMenu.cs
2024-12-26 19:48:31 +09:00

33 lines
977 B
C#

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();
}
}
}