Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_input_material_index.cc
| Show All 14 Lines | |||||
| */ | */ | ||||
| #include "node_geometry_util.hh" | #include "node_geometry_util.hh" | ||||
| namespace blender::nodes { | namespace blender::nodes { | ||||
| static void geo_node_input_material_index_declare(NodeDeclarationBuilder &b) | static void geo_node_input_material_index_declare(NodeDeclarationBuilder &b) | ||||
| { | { | ||||
| b.add_output<decl::Int>("Material Index").field_source(); | b.add_output<decl::Int>(N_("Material Index")).field_source(); | ||||
| } | } | ||||
| static void geo_node_input_material_index_exec(GeoNodeExecParams params) | static void geo_node_input_material_index_exec(GeoNodeExecParams params) | ||||
| { | { | ||||
| Field<int> material_index_field = AttributeFieldInput::Create<int>("material_index"); | Field<int> material_index_field = AttributeFieldInput::Create<int>("material_index"); | ||||
| params.set_output("Material Index", std::move(material_index_field)); | params.set_output("Material Index", std::move(material_index_field)); | ||||
| } | } | ||||
| Show All 11 Lines | |||||