diff options
author | Campbell Barton <ideasman42@gmail.com> | 2006-01-03 05:35:45 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2006-01-03 05:35:45 +0300 |
commit | 5f48930a7514922efe7cebda971bd758e3d6b8cf (patch) | |
tree | 90dadc6353fa88e37d4693f8e2a4ccfcfc7f874f /source/blender/src/editcurve.c | |
parent | 80f903ed73878c42b005069c2453c2737275a845 (diff) |
Moved Object.Join() into a function of an object.
eg.
ret_val = ob.join(objects)
Now it dosent depend on the current selection, or change the selection context.
Made respective join_* functions return 0 if the join was not mode, 1 when it workes.
Diffstat (limited to 'source/blender/src/editcurve.c')
-rw-r--r-- | source/blender/src/editcurve.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/source/blender/src/editcurve.c b/source/blender/src/editcurve.c index fe09c3cc2ad..b660836f9d2 100644 --- a/source/blender/src/editcurve.c +++ b/source/blender/src/editcurve.c @@ -3275,7 +3275,7 @@ void nurb_set_smooth(short event) else if(event==0) BIF_undo_push("Set Solid"); } -void join_curve(int type) +int join_curve(int type) { Base *base, *nextb; Object *ob; @@ -3287,11 +3287,9 @@ void join_curve(int type) float imat[4][4], cmat[4][4]; int a; - /* if(G.obedit) return; */ /* Alredy checked in join_menu() */ - ob= OBACT; - if(ob->type!=type) return; - if(ob->lay & G.vd->lay); else return; + if(ob->type!=type) return 0; + if(ob->lay & G.vd->lay); else return 0; tempbase.first= tempbase.last= 0; /* trasnform all selected curves inverse in obact */ @@ -3353,7 +3351,7 @@ void join_curve(int type) allqueue(REDRAWVIEW3D, 0); allqueue(REDRAWBUTSEDIT, 0); BIF_undo_push("Join"); - + return 1; } |