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:
authorEitan <EitanSomething>2021-06-10 18:16:37 +0300
committerHans Goudey <h.goudey@me.com>2021-06-10 18:16:37 +0300
commit53c98e45cf73eadd044e5b87db47f41ea3ff8f42 (patch)
tree8d55fb4474f1ea807ac9efb6729832b6d34dfe98 /source/blender/nodes/geometry/nodes/node_geo_switch.cc
parentbcefce33f24dd3646b84e1baa0db6db76222f1c2 (diff)
Geometry Nodes: Add Texture and Material options to switch node
These new socket types can be supported in the switch node along with the others. Differential Revision: https://developer.blender.org/D11560
Diffstat (limited to 'source/blender/nodes/geometry/nodes/node_geo_switch.cc')
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_switch.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_switch.cc b/source/blender/nodes/geometry/nodes/node_geo_switch.cc
index 742fafba9e6..0aa5c68aaf5 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_switch.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_switch.cc
@@ -40,6 +40,10 @@ static bNodeSocketTemplate geo_node_switch_in[] = {
{SOCK_OBJECT, N_("True")},
{SOCK_COLLECTION, N_("False")},
{SOCK_COLLECTION, N_("True")},
+ {SOCK_TEXTURE, N_("False")},
+ {SOCK_TEXTURE, N_("True")},
+ {SOCK_MATERIAL, N_("False")},
+ {SOCK_MATERIAL, N_("True")},
{-1, ""},
};
@@ -53,6 +57,8 @@ static bNodeSocketTemplate geo_node_switch_out[] = {
{SOCK_GEOMETRY, N_("Output")},
{SOCK_OBJECT, N_("Output")},
{SOCK_COLLECTION, N_("Output")},
+ {SOCK_TEXTURE, N_("Output")},
+ {SOCK_MATERIAL, N_("Output")},
{-1, ""},
};
@@ -153,6 +159,14 @@ static void geo_node_switch_exec(GeoNodeExecParams params)
output_input<Collection *>(params, input, "_008", "Output_008");
break;
}
+ case SOCK_TEXTURE: {
+ output_input<Tex *>(params, input, "_009", "Output_009");
+ break;
+ }
+ case SOCK_MATERIAL: {
+ output_input<Material *>(params, input, "_010", "Output_010");
+ break;
+ }
default:
BLI_assert_unreachable();
break;