15 .
description(
"The selection of each element as a true or false value");
17 "The selection of each element as a floating point value");
24 static const bool value =
true;
28 static const float value = 1.0f;
42 static const bool value =
false;
46 static const float value = 0.0f;
59 case AttrDomain::Point:
60 return ".select_vert";
61 case AttrDomain::Edge:
62 return ".select_edge";
63 case AttrDomain::Face:
64 case AttrDomain::Corner:
65 return ".select_poly";
75 : bke::GeometryFieldInput(*bke::custom_data_type_to_cpp_type(data_type),
"Edit Selection")
83 const AttrDomain domain = context.domain();
86 switch (context.type()) {
90 ".selection", domain, data_type,
true_value(data_type));
92 return *attributes.lookup_or_default(
103 : bke::GeometryFieldInput(*bke::custom_data_type_to_cpp_type(data_type),
"Sculpt Selection")
111 const AttrDomain domain = context.domain();
114 switch (context.type()) {
118 ".selection", domain, data_type,
true_value(data_type));
120 const VArraySpan<float> attribute = *attributes.lookup<
float>(
".sculpt_mask", domain);
121 if (attribute.is_empty()) {
127 mask.foreach_index_optimized<
int>(
128 GrainSize(4096), [&](
const int i) { selection[i] = attribute[i] < 1.0f; });
133 mask.foreach_index_optimized<
int>(
134 GrainSize(4096), [&](
const int i) { selection[i] = 1.0f - attribute[i]; });
151 switch (object_mode) {
155 return GField(std::make_shared<EditSelectionFieldInput>(data_type));
158 return GField(std::make_shared<SculptSelectionFieldInput>(data_type));
#define BLI_assert_unreachable()
#define NOD_REGISTER_NODE(REGISTER_FUNC)
static GVArray ForSingle(const CPPType &type, int64_t size, const void *value)
static VArray ForContainer(ContainerT container)
GAttributeReader lookup_or_default(StringRef attribute_id, AttrDomain domain, eCustomDataType data_type, const void *default_value=nullptr) const
local_group_size(16, 16) .push_constant(Type b
eCustomDataType cpp_type_to_custom_data_type(const CPPType &type)
void node_register_type(bNodeType *ntype)
GField make_constant_field(const CPPType &type, const void *value)
void search_link_ops_for_tool_node(GatherLinkSearchOpParams ¶ms)
bool check_tool_context_and_error(GeoNodeExecParams ¶ms)
void geo_node_type_base(blender::bke::bNodeType *ntype, int type, const char *name, short nclass)
GPU_SHADER_INTERFACE_INFO(overlay_edit_curve_handle_iface, "vert").flat(Type pos vertex_in(1, Type::UINT, "data") .vertex_out(overlay_edit_curve_handle_iface) .geometry_layout(PrimitiveIn Frequency::GEOMETRY storage_buf(1, Qualifier::READ, "uint", "data[]", Frequency::GEOMETRY) .push_constant(Type Frequency::GEOMETRY selection[]
NodeGeometryExecFunction geometry_node_execute
NodeGatherSocketLinkOperationsFunction gather_link_search_ops
NodeDeclareFunction declare