浏览代码

get channel as monochromatic

Johann ELSASS 5 年之前
父节点
当前提交
994439a6ea
共有 1 个文件被更改,包括 18 次插入0 次删除
  1. 18 0
      resources/scripts/channels_monochromatic.py

+ 18 - 0
resources/scripts/channels_monochromatic.py

@@ -0,0 +1,18 @@
+# Channels > Make monochromatic
+from lazpaint import image, dialog, layer, filters
+
+channel = layer.get_registry("split-channel")
+if channel == "R" or channel == "C":
+  source = "red"
+elif channel == "G" or channel == "M":
+  source = "green"
+elif channel == "B" or channel == "Y":
+  source = "blue"
+elif channel == "H":
+  dialog.show_message("Remove this layer to remove hue")
+  exit()  
+else:
+  dialog.show_message("This is not a chromatic channel")
+  exit()
+
+filters.filter_function(red = source, green = source, blue = source)