diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-12-07 15:52:12 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-01-26 17:20:13 +0300 |
commit | ac58a7fa190de82ee8265cfe9f1b7a7323b86982 (patch) | |
tree | c5f7ab63e5fcbec65426742e46540bfc161974b6 /source/blender/nodes | |
parent | 18cf3e1a38a3cf50a182ef8ae764ccd3b37216aa (diff) |
Compositor: Make HSV node inputs a real sockets
This is much more flexible solution which will allow doing some
more procedural features.
Reviewers: brecht, dfelinto, mont29
Reviewed By: mont29
Subscribers: Severin
Differential Revision: https://developer.blender.org/D2403
Diffstat (limited to 'source/blender/nodes')
-rw-r--r-- | source/blender/nodes/NOD_static_types.h | 2 | ||||
-rw-r--r-- | source/blender/nodes/composite/nodes/node_composite_hueSatVal.c | 16 |
2 files changed, 5 insertions, 13 deletions
diff --git a/source/blender/nodes/NOD_static_types.h b/source/blender/nodes/NOD_static_types.h index 171d5313c1d..a9c0df7d7e8 100644 --- a/source/blender/nodes/NOD_static_types.h +++ b/source/blender/nodes/NOD_static_types.h @@ -145,7 +145,7 @@ DefNode( CompositorNode, CMP_NODE_VECBLUR, def_cmp_vector_blur, "VECBL DefNode( CompositorNode, CMP_NODE_SEPRGBA, 0, "SEPRGBA", SepRGBA, "Separate RGBA", "" ) DefNode( CompositorNode, CMP_NODE_SEPHSVA, 0, "SEPHSVA", SepHSVA, "Separate HSVA", "" ) DefNode( CompositorNode, CMP_NODE_SETALPHA, 0, "SETALPHA", SetAlpha, "Set Alpha", "" ) -DefNode( CompositorNode, CMP_NODE_HUE_SAT, def_cmp_hue_saturation, "HUE_SAT", HueSat, "Hue Saturation Value","" ) +DefNode( CompositorNode, CMP_NODE_HUE_SAT, 0, "HUE_SAT", HueSat, "Hue Saturation Value","" ) DefNode( CompositorNode, CMP_NODE_IMAGE, def_cmp_image, "IMAGE", Image, "Image", "" ) DefNode( CompositorNode, CMP_NODE_R_LAYERS, def_cmp_render_layers, "R_LAYERS", RLayers, "Render Layers", "" ) DefNode( CompositorNode, CMP_NODE_COMPOSITE, def_cmp_composite, "COMPOSITE", Composite, "Composite", "" ) diff --git a/source/blender/nodes/composite/nodes/node_composite_hueSatVal.c b/source/blender/nodes/composite/nodes/node_composite_hueSatVal.c index 1c31f4863ca..952ba78aff3 100644 --- a/source/blender/nodes/composite/nodes/node_composite_hueSatVal.c +++ b/source/blender/nodes/composite/nodes/node_composite_hueSatVal.c @@ -35,8 +35,11 @@ /* **************** Hue Saturation ******************** */ static bNodeSocketTemplate cmp_node_hue_sat_in[] = { - { SOCK_FLOAT, 1, N_("Fac"), 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR}, { SOCK_RGBA, 1, N_("Image"), 1.0f, 1.0f, 1.0f, 1.0f}, + { SOCK_FLOAT, 1, N_("Hue"), 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR}, + { SOCK_FLOAT, 1, N_("Saturation"), 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR}, + { SOCK_FLOAT, 1, N_("Value"), 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR}, + { SOCK_FLOAT, 1, N_("Fac"), 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR}, { -1, 0, "" } }; static bNodeSocketTemplate cmp_node_hue_sat_out[] = { @@ -44,23 +47,12 @@ static bNodeSocketTemplate cmp_node_hue_sat_out[] = { { -1, 0, "" } }; -static void node_composit_init_hue_sat(bNodeTree *UNUSED(ntree), bNode *node) -{ - NodeHueSat *nhs = MEM_callocN(sizeof(NodeHueSat), "node hue sat"); - node->storage = nhs; - nhs->hue = 0.5f; - nhs->sat = 1.0f; - nhs->val = 1.0f; -} - void register_node_type_cmp_hue_sat(void) { static bNodeType ntype; cmp_node_type_base(&ntype, CMP_NODE_HUE_SAT, "Hue Saturation Value", NODE_CLASS_OP_COLOR, 0); node_type_socket_templates(&ntype, cmp_node_hue_sat_in, cmp_node_hue_sat_out); - node_type_init(&ntype, node_composit_init_hue_sat); - node_type_storage(&ntype, "NodeHueSat", node_free_standard_storage, node_copy_standard_storage); nodeRegisterType(&ntype); } |