Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2004-07-13 15:48:52 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2004-07-13 15:48:52 +0400
commite0773281220c5af56585b0e07ccdbfc6ee485b4f (patch)
tree4b06de628461f5822cb31c59eb6c6768ae06cc6f /source/blender/makesdna/DNA_mesh_types.h
parent4f1c674ee02e07a6986a54a312d7fb9e2547e950 (diff)
Added LSCM UV Unwrapping:
http://www.loria.fr/~levy/Galleries/LSCM/index.html http://www.loria.fr/~levy/Papers/2002/s2002_lscm.pdf Implementation Least Squares Conformal Maps parameterization, based on chapter 2 of: Bruno Levy, Sylvain Petitjean, Nicolas Ray, Jerome Maillot. Least Squares Conformal Maps for Automatic Texture Atlas Generation. In Siggraph 2002, July 2002. Seams: Stored as a flag (ME_SEAM) in the new MEdge struct, these seams define where a mesh will be cut when executing LSCM unwrapping. Seams can be marked and cleared in Edit Mode. Ctrl+EKEY will pop up a menu allowing to Clear or Mark the selected edges as seams. Select Linked in Face Select Mode now only selects linked faces if no seams separate them. So if seams are defined, this will now select the 'face group' defined by the seams. Hotkey is still LKEY. LSCM Unwrap: unwrap UV's by calculating a conformal mapping (preserving local angles). Based on seams, the selected faces will be 'cut'. If multiple 'face groups' are selected, they will be unwrapped separately and packed in the image rectangle in the UV Editor. Packing uses a simple and fast algorithm, only designed to avoid having overlapping faces. LSCM can be found in the Unwrap menu (UKEY), and the UV Calculation panel. Pinning: UV's can be pinned in the UV Editor. When LSCM Unwrap is then executed, these UV's will stay in place, allowing to tweak the solution. PKEY and ALT+PKEY will respectively pin and unpin selected UV's. Face Select Mode Drawing Changes: - Draw Seams option to enable disable drawing of seams - Draw Faces option to enable drawing of selected faces in transparent purple - Draw Hidden Edges option to enable drawing of edges of hidden faces - Draw Edges option to enable drawing of edges of visible faces The colors for these seams, faces and edges are themeable.
Diffstat (limited to 'source/blender/makesdna/DNA_mesh_types.h')
-rw-r--r--source/blender/makesdna/DNA_mesh_types.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h
index 674c144923d..f9cb375572b 100644
--- a/source/blender/makesdna/DNA_mesh_types.h
+++ b/source/blender/makesdna/DNA_mesh_types.h
@@ -53,7 +53,7 @@ typedef struct TFace {
float uv[4][2]; /* when you change this: also do function set_correct_uv in editmesh.c, and there are more locations that use the size of this part */
unsigned int col[4];
char flag, transp;
- short mode, tile, pad;
+ short mode, tile, unwrap;
} TFace;
typedef struct Mesh {
@@ -153,6 +153,16 @@ typedef struct Mesh {
#define TF_ALPHA 2
#define TF_SUB 3
+/* tface->unwrap */
+#define TF_SEAM1 1
+#define TF_SEAM2 2
+#define TF_SEAM3 4
+#define TF_SEAM4 8
+#define TF_PIN1 16
+#define TF_PIN2 32
+#define TF_PIN3 64
+#define TF_PIN4 128
+
#define MESH_MAX_VERTS 2000000000L
#endif