diff options
author | Campbell Barton <ideasman42@gmail.com> | 2007-09-22 21:54:13 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2007-09-22 21:54:13 +0400 |
commit | aee06ac0d0ebe22c6156808fcc4d87aca1fbea10 (patch) | |
tree | 444def3be57a5c2134cdff13060c47ccdc7ddb46 /source/blender/src/editmesh.c | |
parent | d5b186ba6bac1e41a87aa4d9153a30a4091524f4 (diff) |
added an active face for the mesh editmode and normal mesh - this is needed because the TFace flag was not always easy to access from editmode.
using the last selected face was almost good enough however when selecting verts and edges the last selected face would become inactive and the space image would flicker about too much.
The active face is used for getting the space image at the moment and keeps scripts that use this flag working also.
This has 2 commands to get and set, so the variable is not accessed directly.
all "UV Calculate" scripts work now
last commit crashed when in solid draw mode, it seems subsurf modifier is ignoring the displayMask since MTFACE is available. just made it do a null check for now.
uvcalc_follow_active_coords.py - should be done inC and put in the snap menu.
Diffstat (limited to 'source/blender/src/editmesh.c')
-rw-r--r-- | source/blender/src/editmesh.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/source/blender/src/editmesh.c b/source/blender/src/editmesh.c index fcfb1a5c40f..678178e6e5b 100644 --- a/source/blender/src/editmesh.c +++ b/source/blender/src/editmesh.c @@ -333,6 +333,10 @@ void free_editface(EditFace *efa) } #endif EM_remove_selection(efa, EDITFACE); + + if (G.editMesh->act_face==efa) + EM_set_actFace(NULL); + CustomData_em_free_block(&G.editMesh->fdata, &efa->data); if(efa->fast==0) free(efa); @@ -809,10 +813,11 @@ void make_editMesh() /* because of reload */ free_editMesh(em); + em->act_face = NULL; G.totvert= tot= me->totvert; G.totedge= me->totedge; G.totface= me->totface; - + if(tot==0) { countall(); return; @@ -906,6 +911,9 @@ void make_editMesh() if((FACESEL_PAINT_TEST) && (efa->f & SELECT)) EM_select_face(efa, 1); /* flush down */ + + if (a==me->act_face) + em->act_face = efa; } } } @@ -1140,6 +1148,9 @@ void load_editMesh(void) /* no index '0' at location 3 or 4 */ test_index_face(mface, &me->fdata, i, efa->v4?4:3); + + if (a==me->act_face) + EM_set_actFace(efa); #ifdef WITH_VERSE if(efa->vface) { |