Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/composite/nodes/node_composite_defocus.cc
- This file was moved from source/blender/nodes/composite/nodes/node_composite_defocus.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" | ||||
| #include <limits.h> | #include <climits> | ||||
| /* ************ qdn: Defocus node ****************** */ | /* ************ Defocus Node ****************** */ | ||||
| static bNodeSocketTemplate cmp_node_defocus_in[] = { | static bNodeSocketTemplate cmp_node_defocus_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}, | ||||
| {SOCK_FLOAT, N_("Z"), 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, PROP_NONE}, | {SOCK_FLOAT, N_("Z"), 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, PROP_NONE}, | ||||
| {-1, ""}, | {-1, ""}, | ||||
| }; | }; | ||||
| static bNodeSocketTemplate cmp_node_defocus_out[] = { | static bNodeSocketTemplate cmp_node_defocus_out[] = { | ||||
| {SOCK_RGBA, N_("Image")}, | {SOCK_RGBA, N_("Image")}, | ||||
| {-1, ""}, | {-1, ""}, | ||||
| }; | }; | ||||
| static void node_composit_init_defocus(bNodeTree *UNUSED(ntree), bNode *node) | static void node_composit_init_defocus(bNodeTree *UNUSED(ntree), bNode *node) | ||||
| { | { | ||||
| /* qdn: defocus node */ | /* defocus node */ | ||||
| NodeDefocus *nbd = MEM_callocN(sizeof(NodeDefocus), "node defocus data"); | NodeDefocus *nbd = (NodeDefocus *)MEM_callocN(sizeof(NodeDefocus), "node defocus data"); | ||||
| nbd->bktype = 0; | nbd->bktype = 0; | ||||
| nbd->rotation = 0.0f; | nbd->rotation = 0.0f; | ||||
| nbd->preview = 1; | nbd->preview = 1; | ||||
| nbd->gamco = 0; | nbd->gamco = 0; | ||||
| nbd->samples = 16; | nbd->samples = 16; | ||||
| nbd->fstop = 128.0f; | nbd->fstop = 128.0f; | ||||
| nbd->maxblur = 16; | nbd->maxblur = 16; | ||||
| nbd->bthresh = 1.0f; | nbd->bthresh = 1.0f; | ||||
| Show All 16 Lines | |||||