Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2022-03-16 20:33:36 +0300
committerHans Goudey <h.goudey@me.com>2022-03-16 20:33:36 +0300
commit2564d152d6edf65afcb573598a1303483c62eb06 (patch)
tree378ffe6dc426d769eda0635971f06849cfef301c /source/blender/nodes/shader/nodes/node_shader_vector_rotate.cc
parent263c5b33d697f6202e3d9b07317e1dc05ffb9a25 (diff)
Cleanup: Remove unnecessary namespace specification
Ever since d5b72fb06cd0405c46, shader nodes have been in the `blender::nodes` namespace, so they don't need to use that to access Blender's C++ types and functions.
Diffstat (limited to 'source/blender/nodes/shader/nodes/node_shader_vector_rotate.cc')
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_vector_rotate.cc29
1 files changed, 13 insertions, 16 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_vector_rotate.cc b/source/blender/nodes/shader/nodes/node_shader_vector_rotate.cc
index b8c44b527b5..3f1a9d758ae 100644
--- a/source/blender/nodes/shader/nodes/node_shader_vector_rotate.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_vector_rotate.cc
@@ -63,8 +63,6 @@ static int gpu_shader_vector_rotate(GPUMaterial *mat,
return 0;
}
-using blender::float3;
-
static float3 sh_node_vector_rotate_around_axis(const float3 vector,
const float3 center,
const float3 axis,
@@ -92,7 +90,7 @@ static float3 sh_node_vector_rotate_euler(const float3 vector,
return result + center;
}
-static const blender::fn::MultiFunction *get_multi_function(bNode &node)
+static const fn::MultiFunction *get_multi_function(bNode &node)
{
bool invert = node.custom2;
const int mode = node.custom1;
@@ -100,13 +98,13 @@ static const blender::fn::MultiFunction *get_multi_function(bNode &node)
switch (mode) {
case NODE_VECTOR_ROTATE_TYPE_AXIS: {
if (invert) {
- static blender::fn::CustomMF_SI_SI_SI_SI_SO<float3, float3, float3, float, float3> fn{
+ static fn::CustomMF_SI_SI_SI_SI_SO<float3, float3, float3, float, float3> fn{
"Rotate Axis", [](float3 in, float3 center, float3 axis, float angle) {
return sh_node_vector_rotate_around_axis(in, center, axis, -angle);
}};
return &fn;
}
- static blender::fn::CustomMF_SI_SI_SI_SI_SO<float3, float3, float3, float, float3> fn{
+ static fn::CustomMF_SI_SI_SI_SI_SO<float3, float3, float3, float, float3> fn{
"Rotate Axis", [](float3 in, float3 center, float3 axis, float angle) {
return sh_node_vector_rotate_around_axis(in, center, axis, angle);
}};
@@ -115,13 +113,13 @@ static const blender::fn::MultiFunction *get_multi_function(bNode &node)
case NODE_VECTOR_ROTATE_TYPE_AXIS_X: {
float3 axis = float3(1.0f, 0.0f, 0.0f);
if (invert) {
- static blender::fn::CustomMF_SI_SI_SI_SO<float3, float3, float, float3> fn{
+ static fn::CustomMF_SI_SI_SI_SO<float3, float3, float, float3> fn{
"Rotate X-Axis", [=](float3 in, float3 center, float angle) {
return sh_node_vector_rotate_around_axis(in, center, axis, -angle);
}};
return &fn;
}
- static blender::fn::CustomMF_SI_SI_SI_SO<float3, float3, float, float3> fn{
+ static fn::CustomMF_SI_SI_SI_SO<float3, float3, float, float3> fn{
"Rotate X-Axis", [=](float3 in, float3 center, float angle) {
return sh_node_vector_rotate_around_axis(in, center, axis, angle);
}};
@@ -130,13 +128,13 @@ static const blender::fn::MultiFunction *get_multi_function(bNode &node)
case NODE_VECTOR_ROTATE_TYPE_AXIS_Y: {
float3 axis = float3(0.0f, 1.0f, 0.0f);
if (invert) {
- static blender::fn::CustomMF_SI_SI_SI_SO<float3, float3, float, float3> fn{
+ static fn::CustomMF_SI_SI_SI_SO<float3, float3, float, float3> fn{
"Rotate Y-Axis", [=](float3 in, float3 center, float angle) {
return sh_node_vector_rotate_around_axis(in, center, axis, -angle);
}};
return &fn;
}
- static blender::fn::CustomMF_SI_SI_SI_SO<float3, float3, float, float3> fn{
+ static fn::CustomMF_SI_SI_SI_SO<float3, float3, float, float3> fn{
"Rotate Y-Axis", [=](float3 in, float3 center, float angle) {
return sh_node_vector_rotate_around_axis(in, center, axis, angle);
}};
@@ -145,13 +143,13 @@ static const blender::fn::MultiFunction *get_multi_function(bNode &node)
case NODE_VECTOR_ROTATE_TYPE_AXIS_Z: {
float3 axis = float3(0.0f, 0.0f, 1.0f);
if (invert) {
- static blender::fn::CustomMF_SI_SI_SI_SO<float3, float3, float, float3> fn{
+ static fn::CustomMF_SI_SI_SI_SO<float3, float3, float, float3> fn{
"Rotate Z-Axis", [=](float3 in, float3 center, float angle) {
return sh_node_vector_rotate_around_axis(in, center, axis, -angle);
}};
return &fn;
}
- static blender::fn::CustomMF_SI_SI_SI_SO<float3, float3, float, float3> fn{
+ static fn::CustomMF_SI_SI_SI_SO<float3, float3, float, float3> fn{
"Rotate Z-Axis", [=](float3 in, float3 center, float angle) {
return sh_node_vector_rotate_around_axis(in, center, axis, angle);
}};
@@ -159,13 +157,13 @@ static const blender::fn::MultiFunction *get_multi_function(bNode &node)
}
case NODE_VECTOR_ROTATE_TYPE_EULER_XYZ: {
if (invert) {
- static blender::fn::CustomMF_SI_SI_SI_SO<float3, float3, float3, float3> fn{
+ static fn::CustomMF_SI_SI_SI_SO<float3, float3, float3, float3> fn{
"Rotate Euler", [](float3 in, float3 center, float3 rotation) {
return sh_node_vector_rotate_euler(in, center, rotation, true);
}};
return &fn;
}
- static blender::fn::CustomMF_SI_SI_SI_SO<float3, float3, float3, float3> fn{
+ static fn::CustomMF_SI_SI_SI_SO<float3, float3, float3, float3> fn{
"Rotate Euler", [](float3 in, float3 center, float3 rotation) {
return sh_node_vector_rotate_euler(in, center, rotation, false);
}};
@@ -177,10 +175,9 @@ static const blender::fn::MultiFunction *get_multi_function(bNode &node)
}
}
-static void sh_node_vector_rotate_build_multi_function(
- blender::nodes::NodeMultiFunctionBuilder &builder)
+static void sh_node_vector_rotate_build_multi_function(NodeMultiFunctionBuilder &builder)
{
- const blender::fn::MultiFunction *fn = get_multi_function(builder.node());
+ const fn::MultiFunction *fn = get_multi_function(builder.node());
builder.set_matching_fn(fn);
}