33 lines
977 B
C#
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();
|
|
}
|
|
}
|
|
} |