28 if (
const bNode *node =
b.node_or_null()) {
31 b.add_input<
decl::Bool>(
"Selection").default_value(
true).field_on_all();
34 b.add_input<
decl::Float>(
"Selection").default_value(1.0f).field_on_all();
58 static auto clamp = mf::build::SI1_SO<float, float>(
59 "Clamp", [](
const float value) {
return std::clamp(value, 0.0f, 1.0f); });
66 static auto invert = mf::build::SI1_SO<bool, bool>(
"Invert Selection",
67 [](
const bool value) {
return !value; });
71 static auto invert = mf::build::SI1_SO<float, float>(
72 "Invert Selection", [](
const float value) {
return 1.0f - value; });
84 params.error_message_add(NodeWarningType::Error,
85 "Selection control is not supported in object mode");
99 case AttrDomain::Point:
102 mesh->attributes_for_write().remove(
".select_edge");
103 mesh->attributes_for_write().remove(
".select_poly");
110 case AttrDomain::Edge:
117 case AttrDomain::Face:
120 mesh->attributes_for_write().remove(
".select_vert");
121 mesh->attributes_for_write().remove(
".select_edge");
136 std::make_shared<bke::EvaluateOnDomainInput>(
selection, domain));
153 if (
ELEM(domain, AttrDomain::Point, AttrDomain::Curve)) {
160 if (domain == AttrDomain::Point) {
177 int(AttrDomain::Point));
183 "Store true or false selection values in edit mode"},
188 "Store floating point selection values. For mesh geometry, stored inverted as the sculpt "
190 {0,
nullptr, 0,
nullptr,
nullptr},
#define NODE_CLASS_GEOMETRY
#define GEO_NODE_TOOL_SET_SELECTION
#define NOD_REGISTER_NODE(REGISTER_FUNC)
#define NOD_inline_enum_accessors(member)
void uiItemR(uiLayout *layout, PointerRNA *ptr, const char *propname, eUI_Item_Flag flag, const char *name, int icon)
static const CPPType & get()
GVArray try_convert(GVArray varray, const CPPType &to_type) const
static std::shared_ptr< FieldOperation > Create(std::shared_ptr< const mf::MultiFunction > function, Vector< GField > inputs={})
local_group_size(16, 16) .push_constant(Type b
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
CCL_NAMESPACE_BEGIN ccl_device float invert(float color, float factor)
void mesh_select_vert_flush(Mesh &mesh)
const DataTypeConversions & get_implicit_type_conversions()
void mesh_select_edge_flush(Mesh &mesh)
bool try_capture_field_on_geometry(MutableAttributeAccessor attributes, const fn::FieldContext &field_context, const StringRef attribute_id, AttrDomain domain, const fn::Field< bool > &selection, const fn::GField &field)
void node_register_type(bNodeType *ntype)
void mesh_select_face_flush(Mesh &mesh)
void search_link_ops_for_tool_node(GatherLinkSearchOpParams ¶ms)
PropertyRNA * RNA_def_node_enum(StructRNA *srna, const char *identifier, const char *ui_name, const char *ui_description, const EnumPropertyItem *static_items, const EnumRNAAccessors accessors, std::optional< int > default_value, const EnumPropertyItemFunc item_func, const bool allow_animation)
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[]
const EnumPropertyItem rna_enum_attribute_domain_point_edge_face_curve_items[]
void(* initfunc)(bNodeTree *ntree, bNode *node)
NodeGeometryExecFunction geometry_node_execute
void(* draw_buttons)(uiLayout *, bContext *C, PointerRNA *ptr)
NodeGatherSocketLinkOperationsFunction gather_link_search_ops
NodeDeclareFunction declare
ccl_device_inline int clamp(int a, int mn, int mx)