Commit: dc37990e24eb801e3ff9f9f0f42d364a0af0389e Author: Johnny Matthews Date: Wed Oct 27 09:03:29 2021 -0500 Branches: master https://developer.blender.org/rBdc37990e24eb801e3ff9f9f0f42d364a0af0389e
Geometry Nodes: Add Image Socket to Switch Node Add the image type to the switch node without field support. Differential Revision: https://developer.blender.org/D13012 =================================================================== M source/blender/makesrna/intern/rna_nodetree.c M source/blender/nodes/geometry/nodes/node_geo_switch.cc =================================================================== diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 8535d334f39..6a36ef07dee 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -2056,7 +2056,8 @@ static bool switch_type_supported(const EnumPropertyItem *item) SOCK_OBJECT, SOCK_COLLECTION, SOCK_TEXTURE, - SOCK_MATERIAL); + SOCK_MATERIAL, + SOCK_IMAGE); } static const EnumPropertyItem *rna_GeometryNodeSwitch_type_itemf(bContext *UNUSED(C), diff --git a/source/blender/nodes/geometry/nodes/node_geo_switch.cc b/source/blender/nodes/geometry/nodes/node_geo_switch.cc index c01fcf5bb5f..28faf217f64 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_switch.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_switch.cc @@ -60,6 +60,8 @@ static void geo_node_switch_declare(NodeDeclarationBuilder &b) b.add_input<decl::Texture>("True", "True_009"); b.add_input<decl::Material>("False", "False_010"); b.add_input<decl::Material>("True", "True_010"); + b.add_input<decl::Image>("False", "False_011"); + b.add_input<decl::Image>("True", "True_011"); b.add_output<decl::Float>("Output").dependent_field(); b.add_output<decl::Int>("Output", "Output_001").dependent_field(); @@ -72,6 +74,7 @@ static void geo_node_switch_declare(NodeDeclarationBuilder &b) b.add_output<decl::Collection>("Output", "Output_008"); b.add_output<decl::Texture>("Output", "Output_009"); b.add_output<decl::Material>("Output", "Output_010"); + b.add_output<decl::Image>("Output", "Output_011"); } static void geo_node_switch_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) @@ -274,6 +277,10 @@ static void geo_node_switch_exec(GeoNodeExecParams params) switch_no_fields<Material *>(params, "_010"); break; } + case SOCK_IMAGE: { + switch_no_fields<Image *>(params, "_011"); + break; + } default: BLI_assert_unreachable(); break; _______________________________________________ Bf-blender-cvs mailing list [email protected] List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
