Blender V4.3
blender::nodes::node_geo_set_shade_smooth_cc Namespace Reference

Functions

static void node_declare (NodeDeclarationBuilder &b)
 
static void node_layout (uiLayout *layout, bContext *, PointerRNA *ptr)
 
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 set_sharp (Mesh &mesh, const AttrDomain domain, const StringRef name, const Field< bool > &selection, const Field< bool > &sharpness)
 
static void node_geo_exec (GeoNodeExecParams params)
 
static void node_rna (StructRNA *srna)
 
static void node_register ()
 

Function Documentation

◆ node_declare()

static void blender::nodes::node_geo_set_shade_smooth_cc::node_declare ( NodeDeclarationBuilder & b)
static

◆ node_geo_exec()

static void blender::nodes::node_geo_set_shade_smooth_cc::node_geo_exec ( GeoNodeExecParams params)
static

◆ node_init()

static void blender::nodes::node_geo_set_shade_smooth_cc::node_init ( bNodeTree * ,
bNode * node )
static

Definition at line 31 of file node_geo_set_shade_smooth.cc.

Referenced by node_register().

◆ node_layout()

static void blender::nodes::node_geo_set_shade_smooth_cc::node_layout ( uiLayout * layout,
bContext * ,
PointerRNA * ptr )
static

Definition at line 26 of file node_geo_set_shade_smooth.cc.

References ptr, UI_ITEM_R_EXPAND, and uiItemR().

Referenced by node_register().

◆ node_register()

◆ node_rna()

static void blender::nodes::node_geo_set_shade_smooth_cc::node_rna ( StructRNA * srna)
static

◆ set_sharp()

static void blender::nodes::node_geo_set_shade_smooth_cc::set_sharp ( Mesh & mesh,
const AttrDomain domain,
const StringRef name,
const Field< bool > & selection,
const Field< bool > & sharpness )
static

◆ try_removing_sharp_attribute()

static bool blender::nodes::node_geo_set_shade_smooth_cc::try_removing_sharp_attribute ( Mesh & mesh,
const StringRef name,
const Field< bool > & selection,
const Field< bool > & sharpness )
static

When the sharp_face attribute doesn't exist, all faces are considered smooth. If all faces are selected and the sharp value is a constant false value, we can remove the attribute instead as an optimization to avoid storing it and propagating it in the future.

Definition at line 41 of file node_geo_set_shade_smooth.cc.

References blender::fn::FieldNode::depends_on_input(), blender::fn::evaluate_constant_field(), and blender::fn::GFieldBase< NodePtr >::node().

Referenced by set_sharp().