Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/composite/nodes/node_composite_tonemap.cc
| Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | static void node_composit_init_tonemap(bNodeTree *UNUSED(ntree), bNode *node) | ||||
| ntm->m = 0; /* Actual value is set according to input. */ | ntm->m = 0; /* Actual value is set according to input. */ | ||||
| /* Default a of 1 works well with natural HDR images, but not always so for CGI. | /* Default a of 1 works well with natural HDR images, but not always so for CGI. | ||||
| * Maybe should use 0 or at least lower initial value instead. */ | * Maybe should use 0 or at least lower initial value instead. */ | ||||
| ntm->a = 1; | ntm->a = 1; | ||||
| ntm->c = 0; | ntm->c = 0; | ||||
| node->storage = ntm; | node->storage = ntm; | ||||
| } | } | ||||
| void register_node_type_cmp_tonemap(void) | void register_node_type_cmp_tonemap() | ||||
| { | { | ||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| cmp_node_type_base(&ntype, CMP_NODE_TONEMAP, "Tonemap", NODE_CLASS_OP_COLOR, 0); | cmp_node_type_base(&ntype, CMP_NODE_TONEMAP, "Tonemap", NODE_CLASS_OP_COLOR, 0); | ||||
| ntype.declare = blender::nodes::cmp_node_tonemap_declare; | ntype.declare = blender::nodes::cmp_node_tonemap_declare; | ||||
| node_type_init(&ntype, node_composit_init_tonemap); | node_type_init(&ntype, node_composit_init_tonemap); | ||||
| node_type_storage(&ntype, "NodeTonemap", node_free_standard_storage, node_copy_standard_storage); | node_type_storage(&ntype, "NodeTonemap", node_free_standard_storage, node_copy_standard_storage); | ||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||