diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-07-13 04:40:20 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-07-13 04:40:20 +0400 |
commit | 26ef6da24b3324fb6f8ab6cfe12f101f0d7dedb4 (patch) | |
tree | 375aa10e98780325086c215454f71cdeaef2de4b /source/blender/editors/curve | |
parent | 6fb0181b50461b529bb960950870de941711041e (diff) |
2.5
* Objects now support up to 32767 material slots. It's easy to
increase this further, but I prefer not to increase the memory
usage of mesh faces, it seems unlikely that someone would
create 32767 distinct materials?
* Forward compatibility: the only thing you can potentially lose
reading a 2.5 file in 2.4 is object linking (instead of default
data), though usually that will go fine too. Reading files with
> 32 material slots in 2.4 can start giving issues.
* The ob->colbits variable is deprecated by the array ob->matbits
but I didn't remove the ob->colbits updates in very few places
it is set.
* I hope I changed all the relevant things, various places just
hardcoded the number 16 instead of using the MAXMAT define.
* Join Objects operator back. This is using the version from the
animsys2 branch coded by Joshua, which means it now supports
joining of shape keys.
* Fix for crash reading file saved during render.
Diffstat (limited to 'source/blender/editors/curve')
-rw-r--r-- | source/blender/editors/curve/editcurve.c | 85 |
1 files changed, 35 insertions, 50 deletions
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index c437f35c484..51a9cf5c75a 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -4594,12 +4594,10 @@ void CURVE_OT_smooth_set(wmOperatorType *ot) /************** join operator, to be used externally? ****************/ -int join_curve(bContext *C, wmOperator *op, int type) +int join_curve_exec(bContext *C, wmOperator *op) { - View3D *v3d= CTX_wm_view3d(C); Scene *scene= CTX_data_scene(C); - Object *ob= CTX_data_edit_object(C); - Base *base, *nextb; + Object *ob= CTX_data_active_object(C); Curve *cu; Nurb *nu, *newnu; BezTriple *bezt; @@ -4608,64 +4606,51 @@ int join_curve(bContext *C, wmOperator *op, int type) float imat[4][4], cmat[4][4]; int a; - // XXX not integrated yet, to be called by object/ module? */ - - if(object_data_is_libdata(ob)) { - BKE_report(op->reports, RPT_ERROR, "Can't edit external libdata"); - return OPERATOR_CANCELLED; - } - - if(ob->type!=type) - return 0; - tempbase.first= tempbase.last= 0; /* trasnform all selected curves inverse in obact */ Mat4Invert(imat, ob->obmat); - for(base= FIRSTBASE; base; base=nextb) { - nextb= base->next; - - if(TESTBASE(v3d, base)) { - if(base->object->type==type) { - if(base->object != ob) { - - cu= base->object->data; - - if(cu->nurb.first) { - /* watch it: switch order here really goes wrong */ - Mat4MulMat4(cmat, base->object->obmat, imat); + CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) { + if(base->object->type==ob->type) { + if(base->object != ob) { + + cu= base->object->data; + + if(cu->nurb.first) { + /* watch it: switch order here really goes wrong */ + Mat4MulMat4(cmat, base->object->obmat, imat); + + nu= cu->nurb.first; + while(nu) { + newnu= duplicateNurb(nu); + BLI_addtail(&tempbase, newnu); - nu= cu->nurb.first; - while(nu) { - newnu= duplicateNurb(nu); - BLI_addtail(&tempbase, newnu); - - if( (bezt= newnu->bezt) ) { - a= newnu->pntsu; - while(a--) { - Mat4MulVecfl(cmat, bezt->vec[0]); - Mat4MulVecfl(cmat, bezt->vec[1]); - Mat4MulVecfl(cmat, bezt->vec[2]); - bezt++; - } + if( (bezt= newnu->bezt) ) { + a= newnu->pntsu; + while(a--) { + Mat4MulVecfl(cmat, bezt->vec[0]); + Mat4MulVecfl(cmat, bezt->vec[1]); + Mat4MulVecfl(cmat, bezt->vec[2]); + bezt++; } - if( (bp= newnu->bp) ) { - a= newnu->pntsu*nu->pntsv; - while(a--) { - Mat4MulVecfl(cmat, bp->vec); - bp++; - } + } + if( (bp= newnu->bp) ) { + a= newnu->pntsu*nu->pntsv; + while(a--) { + Mat4MulVecfl(cmat, bp->vec); + bp++; } - nu= nu->next; } + nu= nu->next; } - - ED_base_object_free_and_unlink(scene, base); } + + ED_base_object_free_and_unlink(scene, base); } } } + CTX_DATA_END; cu= ob->data; addlisttolist(&cu->nurb, &tempbase); @@ -4674,8 +4659,8 @@ int join_curve(bContext *C, wmOperator *op, int type) ED_object_enter_editmode(C, EM_WAITCURSOR); ED_object_exit_editmode(C, EM_FREEDATA|EM_WAITCURSOR); - - // BIF_undo_push("Join"); + + WM_event_add_notifier(C, NC_SCENE|ND_OB_ACTIVE, scene); return OPERATOR_FINISHED; } |