Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/composite/nodes/node_composite_tonemap.cc
- This file was moved from source/blender/nodes/composite/nodes/node_composite_tonemap.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" | ||||
| static bNodeSocketTemplate cmp_node_tonemap_in[] = { | static bNodeSocketTemplate cmp_node_tonemap_in[] = { | ||||
| {SOCK_RGBA, N_("Image"), 1.0f, 1.0f, 1.0f, 1.0f}, | {SOCK_RGBA, N_("Image"), 1.0f, 1.0f, 1.0f, 1.0f}, | ||||
| {-1, ""}, | {-1, ""}, | ||||
| }; | }; | ||||
| static bNodeSocketTemplate cmp_node_tonemap_out[] = { | static bNodeSocketTemplate cmp_node_tonemap_out[] = { | ||||
| {SOCK_RGBA, N_("Image")}, | {SOCK_RGBA, N_("Image")}, | ||||
| {-1, ""}, | {-1, ""}, | ||||
| }; | }; | ||||
| static void node_composit_init_tonemap(bNodeTree *UNUSED(ntree), bNode *node) | static void node_composit_init_tonemap(bNodeTree *UNUSED(ntree), bNode *node) | ||||
| { | { | ||||
| NodeTonemap *ntm = MEM_callocN(sizeof(NodeTonemap), "node tonemap data"); | NodeTonemap *ntm = (NodeTonemap *)MEM_callocN(sizeof(NodeTonemap), "node tonemap data"); | ||||
| ntm->type = 1; | ntm->type = 1; | ||||
| ntm->key = 0.18; | ntm->key = 0.18; | ||||
| ntm->offset = 1; | ntm->offset = 1; | ||||
| ntm->gamma = 1; | ntm->gamma = 1; | ||||
| ntm->f = 0; | ntm->f = 0; | ||||
| 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. */ | ||||
| Show All 16 Lines | |||||