diff --git a/addons/material_maker/doc/images/node_swapchannel.png b/addons/material_maker/doc/images/node_swapchannel.png new file mode 100644 index 0000000..8c6e17a Binary files /dev/null and b/addons/material_maker/doc/images/node_swapchannel.png differ diff --git a/addons/material_maker/doc/node_filter_decompose.rst b/addons/material_maker/doc/node_filter_decompose.rst index 1c3b4f4..a3c172d 100644 --- a/addons/material_maker/doc/node_filter_decompose.rst +++ b/addons/material_maker/doc/node_filter_decompose.rst @@ -1,7 +1,7 @@ Decompose node ~~~~~~~~~~~~~~ -The **Decompose** node decomposes anRGBA input into four greyscale outputs. +The **Decompose** node decomposes an RGBA input into four greyscale outputs. .. image:: images/node_decompose.png :align: center diff --git a/addons/material_maker/doc/node_filter_swapchannels.rst b/addons/material_maker/doc/node_filter_swapchannels.rst new file mode 100644 index 0000000..9729982 --- /dev/null +++ b/addons/material_maker/doc/node_filter_swapchannels.rst @@ -0,0 +1,24 @@ +SwapChannels node +~~~~~~~~~~~~~~~~~ + +The **SwapChannels** node can be used to replace each channel (R, G, B and A) of +an with 0, 1 or a channel of its input (inverted or not). + +.. image:: images/node_swapchannel.png + :align: center + +Inputs +++++++ + +The **SwapChannels** node has a single RGBA input. + +Outputs ++++++++ + +The **SwapChannels** node outputs an RGBA image whose channels are defined by its parameters. + +Parameters +++++++++++ + +The **SwapChannels** node has a parameter for each channel that defines its value (0 or 1) +or source (a channel of the input image, inverted or not). diff --git a/addons/material_maker/doc/nodes_filter.rst b/addons/material_maker/doc/nodes_filter.rst index 7b6ecff..06d11e9 100644 --- a/addons/material_maker/doc/nodes_filter.rst +++ b/addons/material_maker/doc/nodes_filter.rst @@ -13,6 +13,7 @@ The filter nodes accept one or several inputs and generate one or several images node_filter_colorize node_filter_combine node_filter_decompose + node_filter_swapchannels node_filter_blend node_filter_blur node_filter_directional_blur diff --git a/addons/material_maker/library/base.json b/addons/material_maker/library/base.json index a513b08..db21c49 100644 --- a/addons/material_maker/library/base.json +++ b/addons/material_maker/library/base.json @@ -2251,6 +2251,19 @@ "tree_item": "Filter/Decompose", "type": "decompose" }, + { + "collapsed": true, + "icon": "filter_swapchannels", + "name": "swap_channels", + "parameters": { + "out_a": 8, + "out_b": 6, + "out_g": 4, + "out_r": 2 + }, + "tree_item": "Filter/SwapChannels", + "type": "swap_channels" + }, { "collapsed": true, "icon": "filter_normal_map", diff --git a/addons/material_maker/library/base/filter_swapchannels.png b/addons/material_maker/library/base/filter_swapchannels.png new file mode 100644 index 0000000..3e77581 Binary files /dev/null and b/addons/material_maker/library/base/filter_swapchannels.png differ