Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/shader/nodes/node_shader_tex_magic.cc
| Show All 18 Lines | |||||
| #include "../node_shader_util.h" | #include "../node_shader_util.h" | ||||
| namespace blender::nodes { | namespace blender::nodes { | ||||
| static void sh_node_tex_magic_declare(NodeDeclarationBuilder &b) | static void sh_node_tex_magic_declare(NodeDeclarationBuilder &b) | ||||
| { | { | ||||
| b.is_function_node(); | b.is_function_node(); | ||||
| b.add_input<decl::Vector>("Vector").implicit_field(); | b.add_input<decl::Vector>(N_("Vector")).implicit_field(); | ||||
| b.add_input<decl::Float>("Scale").min(-1000.0f).max(1000.0f).default_value(5.0f); | b.add_input<decl::Float>(N_("Scale")).min(-1000.0f).max(1000.0f).default_value(5.0f); | ||||
| b.add_input<decl::Float>("Distortion").min(-1000.0f).max(1000.0f).default_value(1.0f); | b.add_input<decl::Float>(N_("Distortion")).min(-1000.0f).max(1000.0f).default_value(1.0f); | ||||
| b.add_output<decl::Color>("Color").no_muted_links(); | b.add_output<decl::Color>(N_("Color")).no_muted_links(); | ||||
| b.add_output<decl::Float>("Fac").no_muted_links(); | b.add_output<decl::Float>(N_("Fac")).no_muted_links(); | ||||
| }; | }; | ||||
| } // namespace blender::nodes | } // namespace blender::nodes | ||||
| static void node_shader_init_tex_magic(bNodeTree *UNUSED(ntree), bNode *node) | static void node_shader_init_tex_magic(bNodeTree *UNUSED(ntree), bNode *node) | ||||
| { | { | ||||
| NodeTexMagic *tex = (NodeTexMagic *)MEM_callocN(sizeof(NodeTexMagic), "NodeTexMagic"); | NodeTexMagic *tex = (NodeTexMagic *)MEM_callocN(sizeof(NodeTexMagic), "NodeTexMagic"); | ||||
| BKE_texture_mapping_default(&tex->base.tex_mapping, TEXMAP_TYPE_POINT); | BKE_texture_mapping_default(&tex->base.tex_mapping, TEXMAP_TYPE_POINT); | ||||
| ▲ Show 20 Lines • Show All 158 Lines • Show Last 20 Lines | |||||