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/blenkernel/BKE_customdata.h
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/blenkernel/BKE_customdata.h')
-rw-r--r--source/blender/blenkernel/BKE_customdata.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_customdata.h b/source/blender/blenkernel/BKE_customdata.h
index 542837dc3fb..b0fe1ebde5d 100644
--- a/source/blender/blenkernel/BKE_customdata.h
+++ b/source/blender/blenkernel/BKE_customdata.h
@@ -169,6 +169,7 @@ void CustomData_swap(struct CustomData *data, int index, int *corner_indices);
*/
void *CustomData_get(const struct CustomData *data, int index, int type);
void *CustomData_em_get(const struct CustomData *data, void *block, int type);
+void *CustomData_em_get_n(const struct CustomData *data, void *block, int type, int n);
/* gets a pointer to the active or first layer of type
* returns NULL if there is no layer of type
@@ -188,11 +189,14 @@ void CustomData_set(const struct CustomData *data, int index, int type,
void *source);
void CustomData_em_set(struct CustomData *data, void *block, int type,
void *source);
+void CustomData_em_set_n(struct CustomData *data, void *block, int type, int n,
+ void *source);
/* set the pointer of to the first layer of type. the old data is not freed.
* returns the value of ptr if the layer is found, NULL otherwise
*/
void *CustomData_set_layer(const struct CustomData *data, int type, void *ptr);
+void *CustomData_set_layer_n(const struct CustomData *data, int type, int n, void *ptr);
/* sets the nth layer of type as active */
void CustomData_set_layer_active(struct CustomData *data, int type, int n);