18 b.add_input<
decl::Bool>(
N_(
"Selection")).default_value(
true).hide_value().supports_field();
26 if (domain_size == 0) {
30 evaluator.
add(selection_field);
32 const IndexMask selection = evaluator.get_evaluated_as_mask(0);
42 const MPoly &poly = polys[selection[i]];
45 const int index1 = start + j + 1;
46 const int index2 = start + poly.
totloop - j - 1;
56 GSpanAttributeWriter attribute = attributes.lookup_or_add_for_write_span(
57 attribute_id, ATTR_DOMAIN_CORNER, meta_data.data_type);
58 attribute_math::convert_to_static_type(meta_data.data_type, [&](auto dummy) {
59 using T = decltype(dummy);
60 MutableSpan<T> dst_span = attribute.span.typed<T>();
61 for (const int j : selection.index_range()) {
62 const MPoly &poly = polys[selection[j]];
63 dst_span.slice(poly.loopstart + 1, poly.totloop - 1).reverse();
86 params.set_output(
"Mesh", std::move(geometry_set));
void * CustomData_duplicate_referenced_layer(struct CustomData *data, int type, int totelem)
@ GEO_COMPONENT_TYPE_MESH
#define NODE_CLASS_GEOMETRY
#define GEO_NODE_FLIP_FACES
void nodeRegisterType(struct bNodeType *ntype)
static uint8 component(Color32 c, uint i)
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Sky Generate a procedural sky texture Noise Generate fractal Perlin noise Wave Generate procedural bands or rings with noise Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a or normal between and object coordinate space Combine Create a color from its and value channels Color Retrieve a color attribute
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
ATTR_WARN_UNUSED_RESULT const BMVert * v
IndexRange index_range() const
bool for_all(const AttributeForeachCallback fn) const
int add(GField field, GVArray *varray_ptr)
static void node_declare(NodeDeclarationBuilder &b)
static void node_geo_exec(GeoNodeExecParams params)
static void mesh_flip_faces(MeshComponent &component, const Field< bool > &selection_field)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
void register_node_type_geo_flip_faces()
void geo_node_type_base(bNodeType *ntype, int type, const char *name, short nclass)
GeometryComponent & get_component_for_write(GeometryComponentType component_type)
void modify_geometry_sets(ForeachSubGeometryCallback callback)
NodeGeometryExecFunction geometry_node_execute
NodeDeclareFunction declare