Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/composite/nodes/node_composite_gamma.cc
- This file was moved from source/blender/nodes/composite/nodes/node_composite_gamma.c.
| Show All 15 Lines | |||||
| * The Original Code is Copyright (C) 2006 Blender Foundation. | * The Original Code is Copyright (C) 2006 Blender Foundation. | ||||
| * All rights reserved. | * All rights reserved. | ||||
| */ | */ | ||||
| /** \file | /** \file | ||||
| * \ingroup cmpnodes | * \ingroup cmpnodes | ||||
| */ | */ | ||||
| #include "node_composite_util.h" | #include "node_composite_util.hh" | ||||
| /* **************** Gamma Tools ******************** */ | /* **************** Gamma Tools ******************** */ | ||||
| static bNodeSocketTemplate cmp_node_gamma_in[] = { | namespace blender::nodes { | ||||
| {SOCK_RGBA, N_("Image"), 1.0f, 1.0f, 1.0f, 1.0f}, | |||||
| {SOCK_FLOAT, N_("Gamma"), 1.0f, 0.0f, 0.0f, 0.0f, 0.001f, 10.0f, PROP_UNSIGNED}, | static void cmp_node_gamma_declare(NodeDeclarationBuilder &b) | ||||
| {-1, ""}, | { | ||||
| }; | b.add_input<decl::Color>("Image").default_value({1.0f, 1.0f, 1.0f, 1.0f}); | ||||
| static bNodeSocketTemplate cmp_node_gamma_out[] = { | b.add_input<decl::Float>("Gamma").default_value(1.0f).min(0.001f).max(10.0f).subtype( | ||||
| {SOCK_RGBA, N_("Image")}, | PROP_UNSIGNED); | ||||
| {-1, ""}, | b.add_output<decl::Color>("Image"); | ||||
| }; | } | ||||
| } // namespace blender::nodes | |||||
| void register_node_type_cmp_gamma(void) | void register_node_type_cmp_gamma(void) | ||||
| { | { | ||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| cmp_node_type_base(&ntype, CMP_NODE_GAMMA, "Gamma", NODE_CLASS_OP_COLOR, 0); | cmp_node_type_base(&ntype, CMP_NODE_GAMMA, "Gamma", NODE_CLASS_OP_COLOR, 0); | ||||
| node_type_socket_templates(&ntype, cmp_node_gamma_in, cmp_node_gamma_out); | ntype.declare = blender::nodes::cmp_node_gamma_declare; | ||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||