22 b.use_custom_socket_order();
23 b.allow_any_socket_order();
24 b.add_default_layout();
29 .propagate_all_geometry()
30 .align_with_previous();
34 .evaluated_geometry_field();
35 b.add_input<
decl::Bool>(
"Shade Smooth"_ustr).default_value(
true).evaluated_geometry_field();
67 mesh.attributes_for_write().remove(name);
77 const int domain_size =
mesh.attributes().domain_size(domain);
78 if (domain_size == 0) {
103 domain == AttrDomain::Face ?
"sharp_face" :
"sharp_edge",
108 params.
set_output(
"Geometry"_ustr, std::move(geometry_set));
119 int(AttrDomain::Face));
127 ntype.
ui_name =
"Set Shade Smooth";
129 "Control the smoothness of mesh normals around each face by changing the \"shade smooth\" "
#define NODE_CLASS_GEOMETRY
#define GEO_NODE_SET_SHADE_SMOOTH
#define NOD_REGISTER_NODE(REGISTER_FUNC)
#define NOD_inline_enum_accessors(member)
bool depends_on_input() const
T extract_input(const UString identifier)
const bNode & node() const
void set_output(const UString identifier, T &&value)
bool try_capture_field_on_geometry(MutableAttributeAccessor attributes, const fn::FieldContext &field_context, const StringRef name, AttrDomain domain, const fn::Field< bool > &selection, const fn::GField &field)
void node_register_type(bNodeType &ntype)
Field< bool > invert_boolean_field(const Field< bool > &field)
void evaluate_constant_field(const GField &field, void *r_value)
void foreach_real_geometry(bke::GeometrySet &geometry, FunctionRef< void(bke::GeometrySet &geometry_set)> fn)
static void node_declare(NodeDeclarationBuilder &b)
static void node_rna(StructRNA *srna)
static void set_sharp(Mesh &mesh, const AttrDomain domain, const StringRef name, const Field< bool > &selection, const Field< bool > &sharpness)
static void node_init(bNodeTree *, bNode *node)
static bool try_removing_sharp_attribute(Mesh &mesh, const StringRef name, const Field< bool > &selection, const Field< bool > &sharpness)
static void node_register()
static void node_layout(ui::Layout &layout, bContext *, PointerRNA *ptr)
static void node_geo_exec(GeoNodeExecParams params)
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)
const EnumPropertyItem rna_enum_attribute_domain_edge_face_items[]
void geo_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
Mesh * get_mesh_for_write()
void(*) draw_buttons(ui::Layout &, bContext *C, PointerRNA *ptr)
std::string ui_description
NodeGeometryExecFunction geometry_node_execute
void(*) initfunc(bNodeTree *ntree, bNode *node)
const char * enum_name_legacy
NodeDeclareFunction declare
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< StringRef > name_opt, int icon, std::optional< StringRef > placeholder=std::nullopt)