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>2006-12-13 00:29:09 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2006-12-13 00:29:09 +0300
commit80ee52e444f05a6fd7a45f2ddfe72720648fbab8 (patch)
tree577238b0fdb738813ca560f0c5fc08dd6b945956 /source/blender/src/editmesh.c
parent47adee414c7848f6ad898e9029205e804b9d6601 (diff)
Multiple UV and vertex color layers: (still work in progress)
These can be created and deleted in the Mesh panel in the same place as before. There is always one active UV and vertex color layer, that is edited and displayed. Important things to do: - Render engine, material support - Multires and NMesh now lose non active layers Also CustomData changes to support muliple layers of the same type, and changes to layer allocation, updated documentation is here: http://mediawiki.blender.org/index.php/BlenderDev/BlenderArchitecture/CustomData
Diffstat (limited to 'source/blender/src/editmesh.c')
-rw-r--r--source/blender/src/editmesh.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/source/blender/src/editmesh.c b/source/blender/src/editmesh.c
index c962bc0f889..b4f1bddc716 100644
--- a/source/blender/src/editmesh.c
+++ b/source/blender/src/editmesh.c
@@ -1004,9 +1004,8 @@ void load_editMesh(void)
oldverts= me->mvert;
ototvert= me->totvert;
- for (i=0; i<me->vdata.totlayer; i++)
- if (me->vdata.layers[i].type == CD_MVERT)
- me->vdata.layers[i].flag |= CD_FLAG_NOFREE;
+ /* don't free this yet */
+ CustomData_set_layer(&me->vdata, CD_MVERT, NULL);
/* free custom data */
CustomData_free(&me->vdata, me->totvert);
@@ -1021,10 +1020,9 @@ void load_editMesh(void)
CustomData_copy(&em->vdata, &me->vdata, CD_MASK_MESH, CD_CALLOC, me->totvert);
CustomData_copy(&em->fdata, &me->fdata, CD_MASK_MESH, CD_CALLOC, me->totface);
- me->mvert= CustomData_add_layer(&me->vdata, CD_MVERT, 0, mvert, me->totvert);
- me->medge= CustomData_add_layer(&me->edata, CD_MEDGE, 0, medge, me->totedge);
- me->mface= CustomData_add_layer(&me->fdata, CD_MFACE, 0, mface, me->totface);
-
+ CustomData_add_layer(&me->vdata, CD_MVERT, CD_ASSIGN, mvert, me->totvert);
+ CustomData_add_layer(&me->edata, CD_MEDGE, CD_ASSIGN, medge, me->totedge);
+ CustomData_add_layer(&me->fdata, CD_MFACE, CD_ASSIGN, mface, me->totface);
mesh_update_customdata_pointers(me);
/* the vertices, use ->tmp.l as counter */
@@ -1095,7 +1093,7 @@ void load_editMesh(void)
mface->v2= (unsigned int) efa->v2->tmp.l;
mface->v3= (unsigned int) efa->v3->tmp.l;
if (efa->v4) mface->v4 = (unsigned int) efa->v4->tmp.l;
-
+
mface->mat_nr= efa->mat_nr;
mface->flag= efa->flag;
@@ -1331,7 +1329,7 @@ void load_editMesh(void)
}
}
}
-
+
mesh_calc_normals(me->mvert, me->totvert, me->mface, me->totface, NULL);
}