Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_material_selection.cc
| Show All 24 Lines | |||||
| #include "BLI_task.hh" | #include "BLI_task.hh" | ||||
| #include "BKE_material.h" | #include "BKE_material.h" | ||||
| namespace blender::nodes { | namespace blender::nodes { | ||||
| static void geo_node_material_selection_declare(NodeDeclarationBuilder &b) | static void geo_node_material_selection_declare(NodeDeclarationBuilder &b) | ||||
| { | { | ||||
| b.add_input<decl::Material>("Material").hide_label(true); | b.add_input<decl::Material>(N_("Material")).hide_label(true); | ||||
| b.add_output<decl::Bool>("Selection").field_source(); | b.add_output<decl::Bool>(N_("Selection")).field_source(); | ||||
| } | } | ||||
| static void select_mesh_by_material(const Mesh &mesh, | static void select_mesh_by_material(const Mesh &mesh, | ||||
| const Material *material, | const Material *material, | ||||
| const IndexMask mask, | const IndexMask mask, | ||||
| const MutableSpan<bool> r_selection) | const MutableSpan<bool> r_selection) | ||||
| { | { | ||||
| BLI_assert(mesh.totpoly >= r_selection.size()); | BLI_assert(mesh.totpoly >= r_selection.size()); | ||||
| ▲ Show 20 Lines • Show All 93 Lines • Show Last 20 Lines | |||||