21 N_(
"This method gives a good 2D representation of a mesh")},
26 N_(
"Uses LSCM (Least Squares Conformal Mapping). This usually gives a less accurate UV "
27 "mapping than Angle Based, but works better for simpler objects")},
28 {0,
nullptr, 0,
nullptr,
nullptr},
37 .description(
"Faces to participate in the unwrap operation");
39 "Edges to mark where the mesh is \"cut\" for the purposes of unwrapping");
41 "Space between islands");
45 "Virtually fill holes in mesh before unwrapping, to better avoid overlaps "
46 "and preserve symmetry");
49 "UV coordinates between 0 and 1 for each face corner in the selected faces");
61 const bool fill_holes,
69 const Span<int> corner_verts = mesh.corner_verts();
73 face_evaluator.
add(selection_field);
82 edge_evaluator.
add(seam_field);
97 const int corner = face[
i];
98 const int vert = corner_verts[corner];
100 mp_co[
i] = positions[vert];
101 mp_uv[
i] = uv[corner];
103 mp_select[
i] =
false;
146 const bool fill_holes_;
153 const bool fill_holes,
157 selection_(selection),
159 fill_holes_(fill_holes),
175 selection_.node().for_each_field_input_recursive(
fn);
176 seam_.node().for_each_field_input_recursive(
fn);
181 return AttrDomain::Corner;
190 const bool fill_holes =
params.extract_input<
bool>(
"Fill Holes");
191 const float margin =
params.extract_input<
float>(
"Margin");
194 selection_field, seam_field, fill_holes, margin, method)));
#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)
constexpr int64_t size() const
constexpr int64_t size() const
static VArray from_container(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_pack(ParamHandle *handle, const UVPackIsland_Params ¶ms)
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_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 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_init(bNodeTree *, bNode *node)
static EnumPropertyItem method_items[]
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
NodeDeclareFunction declare