Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/shader/nodes/node_shader_squeeze.c
- This file was moved from source/blender/nodes/shader/nodes/node_shader_squeeze.cc.
| Show All 15 Lines | |||||
| * The Original Code is Copyright (C) 2005 Blender Foundation. | * The Original Code is Copyright (C) 2005 Blender Foundation. | ||||
| * All rights reserved. | * All rights reserved. | ||||
| */ | */ | ||||
| /** \file | /** \file | ||||
| * \ingroup shdnodes | * \ingroup shdnodes | ||||
| */ | */ | ||||
| #include "node_shader_util.hh" | #include "node_shader_util.h" | ||||
| /* **************** VALUE SQUEEZE ******************** */ | /* **************** VALUE SQUEEZE ******************** */ | ||||
| namespace blender::nodes::node_shader_squeeze_cc { | |||||
| static bNodeSocketTemplate sh_node_squeeze_in[] = { | static bNodeSocketTemplate sh_node_squeeze_in[] = { | ||||
| {SOCK_FLOAT, N_("Value"), 0.0f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f, PROP_NONE}, | {SOCK_FLOAT, N_("Value"), 0.0f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f, PROP_NONE}, | ||||
| {SOCK_FLOAT, N_("Width"), 1.0f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f, PROP_NONE}, | {SOCK_FLOAT, N_("Width"), 1.0f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f, PROP_NONE}, | ||||
| {SOCK_FLOAT, N_("Center"), 0.0f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f, PROP_NONE}, | {SOCK_FLOAT, N_("Center"), 0.0f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f, PROP_NONE}, | ||||
| {-1, ""}}; | {-1, ""}}; | ||||
| static bNodeSocketTemplate sh_node_squeeze_out[] = {{SOCK_FLOAT, N_("Value")}, {-1, ""}}; | static bNodeSocketTemplate sh_node_squeeze_out[] = {{SOCK_FLOAT, N_("Value")}, {-1, ""}}; | ||||
| Show All 17 Lines | static int gpu_shader_squeeze(GPUMaterial *mat, | ||||
| bNode *node, | bNode *node, | ||||
| bNodeExecData *UNUSED(execdata), | bNodeExecData *UNUSED(execdata), | ||||
| GPUNodeStack *in, | GPUNodeStack *in, | ||||
| GPUNodeStack *out) | GPUNodeStack *out) | ||||
| { | { | ||||
| return GPU_stack_link(mat, node, "squeeze", in, out); | return GPU_stack_link(mat, node, "squeeze", in, out); | ||||
| } | } | ||||
| } // namespace blender::nodes::node_shader_squeeze_cc | void register_node_type_sh_squeeze(void) | ||||
| void register_node_type_sh_squeeze() | |||||
| { | { | ||||
| namespace file_ns = blender::nodes::node_shader_squeeze_cc; | |||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| sh_node_type_base(&ntype, SH_NODE_SQUEEZE, "Squeeze Value", NODE_CLASS_CONVERTER, 0); | sh_node_type_base(&ntype, SH_NODE_SQUEEZE, "Squeeze Value", NODE_CLASS_CONVERTER, 0); | ||||
| node_type_socket_templates(&ntype, file_ns::sh_node_squeeze_in, file_ns::sh_node_squeeze_out); | node_type_socket_templates(&ntype, sh_node_squeeze_in, sh_node_squeeze_out); | ||||
| node_type_storage(&ntype, "", nullptr, nullptr); | node_type_storage(&ntype, "", NULL, NULL); | ||||
| node_type_exec(&ntype, nullptr, nullptr, file_ns::node_shader_exec_squeeze); | node_type_exec(&ntype, NULL, NULL, node_shader_exec_squeeze); | ||||
| node_type_gpu(&ntype, file_ns::gpu_shader_squeeze); | node_type_gpu(&ntype, gpu_shader_squeeze); | ||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||