diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/src/editview.c | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/source/blender/src/editview.c b/source/blender/src/editview.c index edf4f09dc41..02b28f1e8d9 100644 --- a/source/blender/src/editview.c +++ b/source/blender/src/editview.c @@ -1073,6 +1073,26 @@ void set_active_base(Base *base) { Base *tbase; + /* activating a non-mesh, should end a couple of modes... */ + if(base) { + if(base->object->type!=OB_MESH) { + if(G.f & G_SCULPTMODE) { + set_sculptmode(); + } + if(G.f & G_WEIGHTPAINT) { + set_wpaint(); /* toggle */ + } + if(G.f & G_VERTEXPAINT) { + set_vpaint(); /* toggle */ + } + } + /* always end this */ + if(G.f & G_FACESELECT) { + set_faceselect(); /* toggle */ + } + } + + /* sets scene->basact */ BASACT= base; if(base) { @@ -1439,7 +1459,7 @@ void mouse_select(void) basact->object->flag= basact->flag; if(oldbasact != basact) { - set_active_base(basact); + set_active_base(basact); } /* for visual speed, only in wire mode */ @@ -1454,23 +1474,6 @@ void mouse_select(void) } } - /* selecting a non-mesh, should end a couple of modes... */ - if(basact->object->type!=OB_MESH) { - if(G.f & G_SCULPTMODE) { - set_sculptmode(); - } - if(G.f & G_WEIGHTPAINT) { - set_wpaint(); /* toggle */ - } - if(G.f & G_VERTEXPAINT) { - set_vpaint(); /* toggle */ - } - } - /* always end this */ - if(G.f & G_FACESELECT) { - set_faceselect(); /* toggle */ - } - allqueue(REDRAWBUTSLOGIC, 0); allqueue(REDRAWDATASELECT, 0); allqueue(REDRAWBUTSOBJECT, 0); |