diff options
author | Ton Roosendaal <ton@blender.org> | 2008-12-31 20:11:42 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2008-12-31 20:11:42 +0300 |
commit | c9b60a7b64c75bf999cb8390b328aa42e7a5f53f (patch) | |
tree | ebd8dc28b62913d6fa7d675c6d21ac31c5c3119e /source/blender/blenkernel/intern/anim.c | |
parent | b65a3e9337ac1d9c3870e0e04ee96090bc7e9b23 (diff) |
2.5
So, editmode mesh is back! :)
At the moment only TABkey works and mouse select, 1 vertex at a
time. More will follow of course.
Note for the devs:
- G.editMesh has been removed, be careful with old code.
- EditMesh now is property of Mesh itself
Although it means unlimited editmodes, for migration purposes we
better stick to 1 "obedit" per scene, which is in Context too
- G.obedit will get removed soon, so use CTX_data_edit_object(C)
Or if you can't, just scene->obedit for now
- Also removed the CTX_data_edit_mesh(), this has no meaning
anymore. EditMesh is not context senstitive anymore, only the
edit-object for time being is.
- Martin: I've already tucked some EditMesh pointer in T and
removed all G.editMesh there.
Diffstat (limited to 'source/blender/blenkernel/intern/anim.c')
-rw-r--r-- | source/blender/blenkernel/intern/anim.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c index 26afa0967c1..953222960f2 100644 --- a/source/blender/blenkernel/intern/anim.c +++ b/source/blender/blenkernel/intern/anim.c @@ -434,28 +434,27 @@ static void vertex_dupli__mapFunc(void *userData, int index, float *co, float *n static void vertex_duplilist(ListBase *lb, ID *id, Object *par, float par_space_mat[][4], int level, int animated) { Object *ob, *ob_iter; - Mesh *me; + Mesh *me= par->data; Base *base = NULL; - float vec[3], no[3], pmat[4][4]; - int lay, totvert, a, oblay; DerivedMesh *dm; struct vertexDupliData vdd; Scene *sce = NULL; Group *group = NULL; GroupObject * go = NULL; + float vec[3], no[3], pmat[4][4]; + int lay, totvert, a, oblay; Mat4CpyMat4(pmat, par->obmat); /* simple preventing of too deep nested groups */ if(level>MAX_DUPLI_RECUR) return; - if(par==G.obedit) - dm= editmesh_get_derived_cage(CD_MASK_BAREMESH); + if(me->edit_mesh) + dm= editmesh_get_derived_cage(me->edit_mesh, CD_MASK_BAREMESH); else dm= mesh_get_derived_deform(par, CD_MASK_BAREMESH); if(G.rendering) { - me= par->data; vdd.orco= (float(*)[3])get_mesh_orco_verts(par); transform_mesh_orco_verts(me, vdd.orco, me->totvert, 0); } @@ -544,7 +543,7 @@ static void face_duplilist(ListBase *lb, ID *id, Object *par, float par_space_ma Base *base = NULL; DupliObject *dob; DerivedMesh *dm; - Mesh *me; + Mesh *me= par->data; MTFace *mtface; MFace *mface; MVert *mvert; @@ -560,9 +559,10 @@ static void face_duplilist(ListBase *lb, ID *id, Object *par, float par_space_ma Mat4CpyMat4(pmat, par->obmat); - if(par==G.obedit) { + if(me->edit_mesh) { int totvert; - dm= editmesh_get_derived_cage(CD_MASK_BAREMESH); + + dm= editmesh_get_derived_cage(me->edit_mesh, CD_MASK_BAREMESH); totface= dm->getNumFaces(dm); mface= MEM_mallocN(sizeof(MFace)*totface, "mface temp"); @@ -580,7 +580,6 @@ static void face_duplilist(ListBase *lb, ID *id, Object *par, float par_space_ma } if(G.rendering) { - me= (Mesh*)par->data; orco= (float(*)[3])get_mesh_orco_verts(par); transform_mesh_orco_verts(me, orco, me->totvert, 0); |