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:
authorNicholas Bishop <nicholasbishop@gmail.com>2007-01-10 09:09:10 +0300
committerNicholas Bishop <nicholasbishop@gmail.com>2007-01-10 09:09:10 +0300
commit043be070504b8d7742b62ce5404f7cab1251dd6c (patch)
treef83cc2ba061330a3a916facaf9c0f906333a7e52 /source/blender/makesdna
parent3f5bd9b3918d636c6510bd9c63f238005905e494 (diff)
Large fix for multires. Changed UV coordinates (MTFaces) to be special first-level data in multires. The data is now stored in a standard CustomData struct in Multires, rather than being stored for each level. (The UVs can now only be edited on level 1.) Changes allow multiple sets of UVs to work correctly. This change should also decrease multires memory usage some (though only when UVs are being used, of course.)
Changes to CustomData: Some functions would only return the current active layer, added extra variants that take an index to select the level (modeled after CustomData_get_layer_n.) Still todo: * UVs are being interpolated linearly, should probably offer Catmull-Clark subdivision like Subsurf modifier. * Vertex Colors still don't support multiple customdata layers. * Editing UV data on levels other than 1 should be disabled in the interface (same for weights)
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_meshdata_types.h19
1 files changed, 8 insertions, 11 deletions
diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h
index caa489cd636..8dab26ebe38 100644
--- a/source/blender/makesdna/DNA_meshdata_types.h
+++ b/source/blender/makesdna/DNA_meshdata_types.h
@@ -88,8 +88,12 @@ typedef struct MTFace {
/* Multiresolution modeling */
typedef struct MultiresCol {
- float a, r, g, b, u, v;
+ float a, r, g, b;
} MultiresCol;
+typedef struct MultiresColFace {
+ /* vertex colors */
+ MultiresCol col[4];
+} MultiresColFace;
typedef struct MultiresFace {
unsigned int v[4];
unsigned int mid;
@@ -101,21 +105,13 @@ typedef struct MultiresEdge {
unsigned int mid;
} MultiresEdge;
-typedef struct MultiresTexColFace {
- /* vertex colors and texfaces */
- struct Image *tex_page;
- MultiresCol col[4];
- short tex_mode, tex_tile, tex_unwrap;
- char tex_flag, tex_transp;
-} MultiresTexColFace;
-
struct MultiresMapNode;
typedef struct MultiresLevel {
struct MultiresLevel *next, *prev;
MVert *verts;
MultiresFace *faces;
- MultiresTexColFace *texcolfaces;
+ MultiresColFace *colfaces;
MultiresEdge *edges;
struct ListBase *vert_edge_map;
struct ListBase *vert_face_map;
@@ -130,7 +126,8 @@ typedef struct Multires {
unsigned char use_col, use_tex;
/* Special level 1 data that cannot be modified from other levels */
- struct CustomData vdata;
+ CustomData vdata;
+ CustomData fdata;
short *edge_flags;
} Multires;