Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/shader/nodes/node_shader_vector_rotate.cc
| Show All 22 Lines | |||||
| #include "../node_shader_util.h" | #include "../node_shader_util.h" | ||||
| namespace blender::nodes { | namespace blender::nodes { | ||||
| static void sh_node_vector_rotate_declare(NodeDeclarationBuilder &b) | static void sh_node_vector_rotate_declare(NodeDeclarationBuilder &b) | ||||
| { | { | ||||
| b.is_function_node(); | b.is_function_node(); | ||||
| b.add_input<decl::Vector>("Vector").min(0.0f).max(1.0f).hide_value(); | b.add_input<decl::Vector>(N_("Vector")).min(0.0f).max(1.0f).hide_value(); | ||||
| b.add_input<decl::Vector>("Center"); | b.add_input<decl::Vector>(N_("Center")); | ||||
| b.add_input<decl::Vector>("Axis").min(-1.0f).max(1.0f).default_value({0.0f, 0.0f, 1.0f}); | b.add_input<decl::Vector>(N_("Axis")).min(-1.0f).max(1.0f).default_value({0.0f, 0.0f, 1.0f}); | ||||
| b.add_input<decl::Float>("Angle").subtype(PROP_ANGLE); | b.add_input<decl::Float>(N_("Angle")).subtype(PROP_ANGLE); | ||||
| b.add_input<decl::Vector>("Rotation").subtype(PROP_EULER); | b.add_input<decl::Vector>(N_("Rotation")).subtype(PROP_EULER); | ||||
| b.add_output<decl::Vector>("Vector"); | b.add_output<decl::Vector>(N_("Vector")); | ||||
| }; | }; | ||||
| } // namespace blender::nodes | } // namespace blender::nodes | ||||
| static const char *gpu_shader_get_name(int mode) | static const char *gpu_shader_get_name(int mode) | ||||
| { | { | ||||
| switch (mode) { | switch (mode) { | ||||
| case NODE_VECTOR_ROTATE_TYPE_AXIS: | case NODE_VECTOR_ROTATE_TYPE_AXIS: | ||||
| ▲ Show 20 Lines • Show All 173 Lines • Show Last 20 Lines | |||||