26 .description(
"Faces to participate in the unwrap operation");
28 "Edges to mark where the mesh is \"cut\" for the purposes of unwrapping");
30 "Space between islands");
34 "Virtually fill holes in mesh before unwrapping, to better avoid overlaps "
35 "and preserve symmetry");
36 b.add_output<
decl::Vector>(
"UV").field_source_reference_all().description(
37 "UV coordinates between 0 and 1 for each face corner in the selected faces");
57 const bool fill_holes,
65 const Span<int> corner_verts = mesh.corner_verts();
69 face_evaluator.
add(selection_field);
78 edge_evaluator.
add(seam_field);
93 const int corner = face[
i];
94 const int vert = corner_verts[corner];
96 mp_co[
i] = positions[vert];
97 mp_uv[
i] = uv[corner];
138 const bool fill_holes_;
145 const bool fill_holes,
149 selection_(selection),
151 fill_holes_(fill_holes),
167 selection_.node().for_each_field_input_recursive(
fn);
168 seam_.node().for_each_field_input_recursive(
fn);
173 return AttrDomain::Corner;
183 const bool fill_holes =
params.extract_input<
bool>(
"Fill Holes");
184 const float margin =
params.extract_input<
float>(
"Margin");
187 selection_field, seam_field, fill_holes, margin, method)));
197 "This method gives a good 2D representation of a mesh"},
202 "Uses LSCM (Least Squares Conformal Mapping). This usually gives a less accurate UV "
203 "mapping than Angle Based, but works better for simpler objects"},
204 {0,
nullptr, 0,
nullptr,
nullptr},
#define NODE_CLASS_CONVERTER
#define NODE_STORAGE_FUNCS(StorageT)
#define GEO_NODE_UV_UNWRAP
GeometryNodeUVUnwrapMethod
@ GEO_NODE_UV_UNWRAP_METHOD_CONFORMAL
@ GEO_NODE_UV_UNWRAP_METHOD_ANGLE_BASED
#define NOD_REGISTER_NODE(REGISTER_FUNC)
#define NOD_storage_enum_accessors(member)
void uiLayoutSetPropSep(uiLayout *layout, bool is_sep)
void uiLayoutSetPropDecorate(uiLayout *layout, bool is_sep)
BMesh const char void * data
constexpr int64_t size() const
constexpr int64_t size() const
static VArray ForContainer(ContainerT container)
int add(GField field, GVArray *varray_ptr)
IndexMask get_evaluated_as_mask(int field_index)
void foreach_index(Fn &&fn) const
void * MEM_callocN(size_t len, const char *str)
void node_register_type(bNodeType &ntype)
void node_type_storage(bNodeType &ntype, std::optional< StringRefNull > storagename, void(*freefunc)(bNode *node), void(*copyfunc)(bNodeTree *dest_ntree, bNode *dest_node, const bNode *src_node))
void uv_parametrizer_construct_end(ParamHandle *phandle, bool fill_holes, bool topology_from_uvs, int *r_count_failed=nullptr)
void uv_parametrizer_edge_set_seam(ParamHandle *phandle, const ParamKey *vkeys)
void uv_parametrizer_average(ParamHandle *handle, bool ignore_pinned, bool scale_uv, bool shear)
void uv_parametrizer_flush(ParamHandle *handle)
void uv_parametrizer_lscm_end(ParamHandle *handle)
void uv_parametrizer_lscm_begin(ParamHandle *handle, bool live, bool abf)
void uv_parametrizer_lscm_solve(ParamHandle *handle, int *count_changed, int *count_failed)
void uv_parametrizer_pack(ParamHandle *handle, float margin, bool do_rotate, bool ignore_pinned)
void uv_parametrizer_face_add(ParamHandle *handle, const ParamKey key, const int nverts, const ParamKey *vkeys, const float **co, float **uv, const float *weight, const bool *pin, const bool *select)
static void node_layout(uiLayout *layout, bContext *, PointerRNA *ptr)
static VArray< float3 > construct_uv_gvarray(const Mesh &mesh, const Field< bool > selection_field, const Field< bool > seam_field, const bool fill_holes, const float margin, const GeometryNodeUVUnwrapMethod method, const AttrDomain domain)
static void node_declare(NodeDeclarationBuilder &b)
static void node_geo_exec(GeoNodeExecParams params)
static void node_register()
static void node_rna(StructRNA *srna)
static void node_init(bNodeTree *, bNode *node)
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)
VecBase< float, 3 > float3
void geo_node_type_base(blender::bke::bNodeType *ntype, std::string idname, const std::optional< int16_t > legacy_type)
void node_free_standard_storage(bNode *node)
void node_copy_standard_storage(bNodeTree *, bNode *dest_node, const bNode *src_node)
std::string ui_description
void(* initfunc)(bNodeTree *ntree, bNode *node)
NodeGeometryExecFunction geometry_node_execute
const char * enum_name_legacy
void(* draw_buttons)(uiLayout *, bContext *C, PointerRNA *ptr)
NodeDeclareFunction declare
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< blender::StringRef > name_opt, int icon, std::optional< blender::StringRef > placeholder=std::nullopt)