- Set local sticky in the uv editor as default. - Don't do live unwrap on fully selected charts or charts with no pins selected. - Fixed bug with live unwrap not respecting transform cancel in some cases. - "View Home" didn't work without an image. - Move UV Calculation settings (cube size, cylinder radius, ..) into the scene toolsettings, instead of global variables - Remove the name LSCM from the UI (and python docs on seams), and replace it with 'Unwrap', with upcoming ABF this didn't make sense anymore. - Move the Old/New LSCM switch into the UV Calculation panel. New LSCM is the default now. Also renamed LSCM there to "Conformal". - Made some room in the UV Calculation panel by removing the buttons to execute the UV calculation, only leaving the settings. Fill Holes: - LSCM now has an option to fill holes in the chart before unwrapping. This on by default, and enables two things: - Prevent internal overlaps (e.g. eyes, mouth) for LSCM unwrapping. - Allow the internal boundaries to move freely during stretch minimize. - The possibility to switch it off is there because it is not always possible to define which the outer boundary is. For example with an open cylinder where there are two identical holes.
86 lines
2.2 KiB
C++
86 lines
2.2 KiB
C++
|
|
#ifndef __PARAMETRIZER_H__
|
|
#define __PARAMETRIZER_H__
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef void ParamHandle; /* handle to a set of charts */
|
|
typedef long ParamKey; /* (hash) key for identifying verts and faces */
|
|
typedef enum ParamBool {
|
|
PARAM_TRUE = 1,
|
|
PARAM_FALSE = 0
|
|
} ParamBool;
|
|
|
|
/* Chart construction:
|
|
-------------------
|
|
- faces and seams may only be added between construct_{begin|end}
|
|
- the pointers to co and uv are stored, rather than being copied
|
|
- vertices are implicitly created
|
|
- in construct_end the mesh will be split up according to the seams
|
|
- the resulting charts must be:
|
|
- manifold, connected, open (at least one boundary loop)
|
|
- output will be written to the uv pointers
|
|
*/
|
|
|
|
ParamHandle *param_construct_begin();
|
|
|
|
void param_face_add(ParamHandle *handle,
|
|
ParamKey key,
|
|
int nverts,
|
|
ParamKey *vkeys,
|
|
float **co,
|
|
float **uv,
|
|
ParamBool *pin,
|
|
ParamBool *select);
|
|
|
|
void param_edge_set_seam(ParamHandle *handle,
|
|
ParamKey *vkeys);
|
|
|
|
void param_construct_end(ParamHandle *handle, ParamBool fill, ParamBool impl);
|
|
void param_delete(ParamHandle *chart);
|
|
|
|
/* Least Squares Conformal Maps:
|
|
-----------------------------
|
|
- charts with less than two pinned vertices are assigned 2 pins
|
|
- lscm is divided in three steps:
|
|
- begin: compute matrix and it's factorization (expensive)
|
|
- solve using pinned coordinates (cheap)
|
|
- end: clean up
|
|
- uv coordinates are allowed to change within begin/end, for
|
|
quick re-solving
|
|
*/
|
|
|
|
void param_lscm_begin(ParamHandle *handle, ParamBool live, ParamBool abf);
|
|
void param_lscm_solve(ParamHandle *handle);
|
|
void param_lscm_end(ParamHandle *handle);
|
|
|
|
/* Stretch */
|
|
|
|
void param_stretch_begin(ParamHandle *handle);
|
|
void param_stretch_blend(ParamHandle *handle, float blend);
|
|
void param_stretch_iter(ParamHandle *handle);
|
|
void param_stretch_end(ParamHandle *handle);
|
|
|
|
/* Area Smooth */
|
|
|
|
void param_smooth_area(ParamHandle *handle);
|
|
|
|
/* Packing */
|
|
|
|
void param_pack(ParamHandle *handle);
|
|
|
|
/* Flushing */
|
|
|
|
void param_flush(ParamHandle *handle);
|
|
void param_flush_restore(ParamHandle *handle);
|
|
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /*__PARAMETRIZER_H__*/
|
|
|