diff options
author | Ton Roosendaal <ton@blender.org> | 2006-01-04 00:43:31 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-01-04 00:43:31 +0300 |
commit | f47899fc0f716464625f43045458e222ce11603d (patch) | |
tree | 1051359e7eb24a5d40826a0ea7aaa925da7d92c0 /source/blender/src/meshtools.c | |
parent | 9557c3a66dccc357f7a8cfecca8e23639208afd2 (diff) | |
parent | 14d5cd1c3145e6f7d6645e1d9623eb9d5d244ad9 (diff) |
Orange; merger with bf-blender.
(Merging is *not* fun work, especially not with bugfixes in main branch
for code that got cleaned up in the other! Poor Hos... :)
Diffstat (limited to 'source/blender/src/meshtools.c')
-rw-r--r-- | source/blender/src/meshtools.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/source/blender/src/meshtools.c b/source/blender/src/meshtools.c index 2b96bbc20b6..3a7df18c584 100644 --- a/source/blender/src/meshtools.c +++ b/source/blender/src/meshtools.c @@ -34,7 +34,7 @@ meshtools.c: no editmode, tools operating on meshes -void join_mesh(void); +int join_mesh(void); void fasterdraw(void); void slowerdraw(void); @@ -115,7 +115,9 @@ static int testSelected_TfaceMesh(void) return 0; } -void join_mesh(void) +/* join selected meshes into the active mesh, context sensitive +return 0 if no join is made (error) and 1 of the join is done */ +int join_mesh(void) { Base *base, *nextb; Object *ob; @@ -132,10 +134,10 @@ void join_mesh(void) bDeformGroup *dg, *odg; MDeformVert *dvert, *dvertmain; - if(G.obedit) return; + if(G.obedit) return 0; ob= OBACT; - if(!ob || ob->type!=OB_MESH) return; + if(!ob || ob->type!=OB_MESH) return 0; /* count */ base= FIRSTBASE; @@ -159,14 +161,13 @@ void join_mesh(void) if(haskey) { error("Can't join meshes with vertex keys"); - return; + return 0; } /* that way the active object is always selected */ - if(ok==0) return; + if(ok==0) return 0; - if(totvert==0 || totvert>MESH_MAX_VERTS) return; + if(totvert==0 || totvert>MESH_MAX_VERTS) return 0; - if(okee("Join selected meshes")==0) return; /* if needed add edges to other meshes */ @@ -439,6 +440,7 @@ void join_mesh(void) allqueue(REDRAWBUTSSHADING, 0); BIF_undo_push("Join Mesh"); + return 1; } |