diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-09-06 04:38:28 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-09-06 04:38:28 +0400 |
commit | 9559c95aaa45a8ca5b5653189d23837458ada9cf (patch) | |
tree | b4768f95d412b1fbf73e466c714e711b92c1b06b | |
parent | d75a66674d17e2f4b1250b63ddb42b431135265c (diff) |
support ANIMFILTER_FOREDIT for mask layers, also move deprecated metaball types to the end of the switch statement when evaluating metaballs.
-rw-r--r-- | source/blender/blenkernel/intern/mball.c | 33 | ||||
-rw-r--r-- | source/blender/editors/animation/anim_filter.c | 4 |
2 files changed, 20 insertions, 17 deletions
diff --git a/source/blender/blenkernel/intern/mball.c b/source/blender/blenkernel/intern/mball.c index a4fec1c0de4..3925c3cc858 100644 --- a/source/blender/blenkernel/intern/mball.c +++ b/source/blender/blenkernel/intern/mball.c @@ -640,21 +640,6 @@ static float densfunc(MetaElem *ball, float x, float y, float z) case MB_BALL: /* do nothing */ break; - case MB_TUBEX: - if (dvec[0] > ball->len) dvec[0] -= ball->len; - else if (dvec[0] < -ball->len) dvec[0] += ball->len; - else dvec[0] = 0.0; - break; - case MB_TUBEY: - if (dvec[1] > ball->len) dvec[1] -= ball->len; - else if (dvec[1] < -ball->len) dvec[1] += ball->len; - else dvec[1] = 0.0; - break; - case MB_TUBEZ: - if (dvec[2] > ball->len) dvec[2] -= ball->len; - else if (dvec[2] < -ball->len) dvec[2] += ball->len; - else dvec[2] = 0.0; - break; case MB_TUBE: if (dvec[0] > ball->expx) dvec[0] -= ball->expx; else if (dvec[0] < -ball->expx) dvec[0] += ball->expx; @@ -686,6 +671,24 @@ static float densfunc(MetaElem *ball, float x, float y, float z) else if (dvec[2] < -ball->expz) dvec[2] += ball->expz; else dvec[2] = 0.0; break; + + /* *** deprecated, could be removed?, do-versioned at least *** */ + case MB_TUBEX: + if (dvec[0] > ball->len) dvec[0] -= ball->len; + else if (dvec[0] < -ball->len) dvec[0] += ball->len; + else dvec[0] = 0.0; + break; + case MB_TUBEY: + if (dvec[1] > ball->len) dvec[1] -= ball->len; + else if (dvec[1] < -ball->len) dvec[1] += ball->len; + else dvec[1] = 0.0; + break; + case MB_TUBEZ: + if (dvec[2] > ball->len) dvec[2] -= ball->len; + else if (dvec[2] < -ball->len) dvec[2] += ball->len; + else dvec[2] = 0.0; + break; + /* *** end deprecated *** */ } dist2 = 1.0f - (len_v3(dvec) / ball->rad2); diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index c92b7ce2761..209414550e3 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -1394,13 +1394,13 @@ static size_t animdata_filter_mask_data(ListBase *anim_data, Mask *mask, const i /* only if selected */ if (ANIMCHANNEL_SELOK(SEL_MASKLAY(masklay)) ) { /* only if editable */ -// if (!(filter_mode & ANIMFILTER_FOREDIT) || EDITABLE_GPL(gpl)) { + if (!(filter_mode & ANIMFILTER_FOREDIT) || EDITABLE_MASK(masklay)) { /* active... */ if (!(filter_mode & ANIMFILTER_ACTIVE) || (masklay_act == masklay)) { /* add to list */ ANIMCHANNEL_NEW_CHANNEL(masklay, ANIMTYPE_MASKLAYER, mask); } -// } + } } } |