1 /*
2 * This program is free software; you can redistribute it and/or
3 * modify it under the terms of the GNU General Public License
4 * as published by the Free Software Foundation; either version 2
5 * of the License, or (at your option) any later version.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software Foundation,
14 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15 *
16 * The Original Code is Copyright (C) 2006 Blender Foundation.
17 * All rights reserved.
18 */
19
20 /** \file
21 * \ingroup cmpnodes
22 */
23
24 #include "node_composite_util.h"
25
26 /* **************** SEPARATE HSVA ******************** */
27 static bNodeSocketTemplate cmp_node_sephsva_in[] = {
28 {SOCK_RGBA, N_("Image"), 1.0f, 1.0f, 1.0f, 1.0f},
29 {-1, ""},
30 };
31 static bNodeSocketTemplate cmp_node_sephsva_out[] = {
32 {SOCK_FLOAT, N_("H")},
33 {SOCK_FLOAT, N_("S")},
34 {SOCK_FLOAT, N_("V")},
35 {SOCK_FLOAT, N_("A")},
36 {-1, ""},
37 };
38
register_node_type_cmp_sephsva(void)39 void register_node_type_cmp_sephsva(void)
40 {
41 static bNodeType ntype;
42
43 cmp_node_type_base(&ntype, CMP_NODE_SEPHSVA, "Separate HSVA", NODE_CLASS_CONVERTOR, 0);
44 node_type_socket_templates(&ntype, cmp_node_sephsva_in, cmp_node_sephsva_out);
45
46 nodeRegisterType(&ntype);
47 }
48
49 /* **************** COMBINE HSVA ******************** */
50 static bNodeSocketTemplate cmp_node_combhsva_in[] = {
51 {SOCK_FLOAT, N_("H"), 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
52 {SOCK_FLOAT, N_("S"), 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
53 {SOCK_FLOAT, N_("V"), 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
54 {SOCK_FLOAT, N_("A"), 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
55 {-1, ""},
56 };
57 static bNodeSocketTemplate cmp_node_combhsva_out[] = {
58 {SOCK_RGBA, N_("Image")},
59 {-1, ""},
60 };
61
register_node_type_cmp_combhsva(void)62 void register_node_type_cmp_combhsva(void)
63 {
64 static bNodeType ntype;
65
66 cmp_node_type_base(&ntype, CMP_NODE_COMBHSVA, "Combine HSVA", NODE_CLASS_CONVERTOR, 0);
67 node_type_socket_templates(&ntype, cmp_node_combhsva_in, cmp_node_combhsva_out);
68
69 nodeRegisterType(&ntype);
70 }
71