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:
authorCampbell Barton <ideasman42@gmail.com>2007-09-25 07:31:12 +0400
committerCampbell Barton <ideasman42@gmail.com>2007-09-25 07:31:12 +0400
commit2c0db4d707f02f747496308565de0d902d55f5aa (patch)
tree21d6ece112cb1c14b5a4b85d50f2d3b9b3256246 /source/blender/src/editface.c
parent3a5db1c40cce63fc97142ee6782d25299a8941a4 (diff)
made active vert/edge/face draw properly with modifiers applied and made their theme default white.
removed active face draw in Face/UV (which is now paint mask mode) mode.
Diffstat (limited to 'source/blender/src/editface.c')
-rw-r--r--source/blender/src/editface.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/source/blender/src/editface.c b/source/blender/src/editface.c
index f5ce9128790..d3af5cc47e8 100644
--- a/source/blender/src/editface.c
+++ b/source/blender/src/editface.c
@@ -560,21 +560,23 @@ void calculate_uv_map(unsigned short mapmode)
allqueue(REDRAWIMAGE, 0);
}
-MTFace *get_active_mtface(EditFace **act_efa, MCol **mcol, short partsel)
+/* last_sel, use em->act_face otherwise get the last selected face in the editselections
+ * at the moment, last_sel is mainly useful for gaking sure the space image dosnt flicker */
+MTFace *get_active_mtface(EditFace **act_efa, MCol **mcol, short sloppy)
{
EditMesh *em = G.editMesh;
EditFace *efa = NULL;
- EditFace *efa_vertsel = NULL; /* use this if one of the faces verts are selected */
EditSelection *ese;
if(!EM_texFaceCheck())
return NULL;
/* first check the active face */
- if (em->act_face) {
+ if (sloppy && em->act_face) {
efa = em->act_face;
} else {
- for (ese = em->selected.last; ese; ese=ese->prev){
+ ese = em->selected.last;
+ for (; ese; ese=ese->prev){
if(ese->type == EDITFACE) {
efa = (EditFace *)ese->data;
@@ -584,21 +586,13 @@ MTFace *get_active_mtface(EditFace **act_efa, MCol **mcol, short partsel)
}
}
- if (!efa) {
+ if (sloppy && !efa) {
for (efa= em->faces.first; efa; efa= efa->next) {
if (efa->f & SELECT)
break;
-
- /* use a face that has 1 vert selected as a last resort
- * This is so selecting verts in editmode does not always make the UV window flicker */
- if (partsel && ((efa->v1->f & SELECT) || (efa->v2->f & SELECT) || (efa->v3->f & SELECT) || (efa->v4 && efa->v4->f & SELECT)))
- efa_vertsel = efa;
}
}
- if (partsel && !efa)
- efa= efa_vertsel;
-
if (efa) {
if (mcol) {
if (CustomData_has_layer(&em->fdata, CD_MCOL))