support ANIMFILTER_FOREDIT for mask layers, also move deprecated metaball types to...
authorCampbell Barton <ideasman42@gmail.com>
Thu, 6 Sep 2012 00:38:28 +0000 (00:38 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 6 Sep 2012 00:38:28 +0000 (00:38 +0000)
source/blender/blenkernel/intern/mball.c
source/blender/editors/animation/anim_filter.c

index a4fec1c0de440ef449294a9c234f84aa26817fa7..3925c3cc858e6ad1af64badba63b0f14049cf9d6 100644 (file)
@@ -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);
index c92b7ce2761e3ad2d2e7c276377afddea312f624..209414550e33ffd16bc45ec8a9805c895e09f0de 100644 (file)
@@ -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);
                                }
-//                     }
+                       }
                }
        }