diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-07-10 13:55:10 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-07-10 13:55:10 +0400 |
commit | 3f9629a4c74685c0a13b8cdfb34768f7b6864d1e (patch) | |
tree | 65165054d092988a4c95c9383c9b77a0881d2cf5 /source/blender/editors/mesh/meshtools.c | |
parent | 6ebfdd8dc33264ca5f172065a5b1f3803eddf20a (diff) |
patch [#36078] Fixes joining behavior for curves and armatures (when active object not selected).
Diffstat (limited to 'source/blender/editors/mesh/meshtools.c')
-rw-r--r-- | source/blender/editors/mesh/meshtools.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c index 51b5e30bc3f..950482df555 100644 --- a/source/blender/editors/mesh/meshtools.c +++ b/source/blender/editors/mesh/meshtools.c @@ -88,9 +88,10 @@ int join_mesh_exec(bContext *C, wmOperator *op) Key *key, *nkey = NULL; KeyBlock *kb, *okb, *kbn; float imat[4][4], cmat[4][4], *fp1, *fp2; - int a, b, totcol, totmat = 0, totedge = 0, totvert = 0, ok = 0; + int a, b, totcol, totmat = 0, totedge = 0, totvert = 0; int totloop = 0, totpoly = 0, vertofs, *matmap = NULL; int i, j, index, haskey = 0, edgeofs, loopofs, polyofs; + bool ok = false; bDeformGroup *dg, *odg; MDeformVert *dvert; CustomData vdata, edata, fdata, ldata, pdata; @@ -119,7 +120,7 @@ int join_mesh_exec(bContext *C, wmOperator *op) totmat += base->object->totcol; if (base->object == ob) - ok = 1; + ok = true; /* check for shapekeys */ if (me->key) @@ -129,7 +130,7 @@ int join_mesh_exec(bContext *C, wmOperator *op) CTX_DATA_END; /* that way the active object is always selected */ - if (ok == 0) { + if (ok == false) { BKE_report(op->reports, RPT_WARNING, "Active object is not a selected mesh"); return OPERATOR_CANCELLED; } |